0

I am setting up an RSS feed, the way the XML is stored, as is common sense to anyone who knows a fair bit about xml or html, the white space is not preserved. I have done some research and not found any answers yet, but was wondering what the newline character is for XML. I.e the equivalent to a carriage return, \n, or <br>
Many thanks!

P.s. I am well aware this may be a dumb question.

gkiar
  • 480
  • 1
  • 6
  • 20
  • Why do you need it? Anyway it's the common \n.
    is a tag for html only.
    – Aurelio De Rosa Nov 01 '11 at 03:03
  • When I display my RSS feed in a block on my page, there is no line between the end of one post and the start of the next, would ideally like to change that. That's why :) – gkiar Nov 01 '11 at 12:23
  • 1
    @iKiar try this http://stackoverflow.com/questions/1351107/how-to-add-line-breaks-in-rss-feeds – Damith Nov 01 '11 at 12:36

2 Answers2

2

A CDATA section maybe? http://www.w3.org/TR/REC-xml/#sec-cdata-sect

I've never used it for an RSS feed. But to illustrate, here's a CDATA newline:

<mytag><![CDATA[ here is
some text ]]></mytag>
Martín Schonaker
  • 7,273
  • 4
  • 32
  • 55
1

Try using the escape code %0D%0A%.

K2so
  • 952
  • 1
  • 6
  • 14