Maybe have also a look to that Stack Overflow – How to add a newline (line break) in XML file?
And use instead of <br/>
Line Feed LF: "
"
Carriage Return CR: "
"
Maybe have also a look to that Stack Overflow – How to add a newline (line break) in XML file?
And use instead of <br/>
Line Feed LF: "
"
Carriage Return CR: "
"
CDATA
is not interpreted as markup, so your <br/>
is only interpreted as Character DATA.
Change
<article-content>
<![CDATA[TEXT, JUST A LOT OF TEXT<br/> EVEN MORE TEXT]]>
</article-content>
to
<article-content>
TEXT, JUST A LOT OF TEXT<br/> EVEN MORE TEXT
</article-content>
or
<article-content>
<![CDATA[TEXT, JUST A LOT OF TEXT
EVEN MORE TEXT]]>
</article-content>
or
<article-content>
<![CDATA[TEXT, JUST A LOT OF TEXT]]><br/> <![CDATA[EVEN MORE TEXT]]>
</article-content>
to have <br/>
be interpreted as markup.
See also
I’m trying to write an XML-Newsfeed for WordPress that can be imported through a plugin and then put in to article-section where it can be edited and so on.
This is what i have:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE content>
<content>
<article id="1">
<mainid>
<![CDATA[DE20201201]]>
</mainid>
<titel>
<![CDATA[Titel]]>
</titel>
<picture>
<![CDATA[https://link.png]]>
</picture>
<article-content>
<![CDATA[TEXT, JUST A LOT OF TEXT<br/> EVEN MORE TEXT]]>
</article-content>
<pubdate>2020-12-01 00:00:59</pubdate>
</article>
</content>
My Problem is that the “<br/>
“‘s in the element are not interpreted as an actual new line in the article in WordPress.
I’m a total noob at this stuff, i know there’s stuff like xsl and xslt but I’m not sure how all of that is working.
Have you tried the escapes r or n instead of
won’t work, the feed has to be in html
Plus one for the link to the canonical newline / line-break Q/A. 😉 Whether this will work will depend upon how the processing application treats the passed-through
these old guys will never disappear
Lol, my old self or my my old answers?
Sorry I did not recognize that I share your own answer! I was thinking about the old LF or CR stuff …
No problem, you recognized its relevance before I did!