The issue that I have is that I cannot figure out how to create new
lines for each line of my poem. The entire poem text is garbled into
a single line in the feed.
The poem text is under the xml tag <description> as follows:
<description> poem text </description>. If I put any of the typical html tags in there to create the new line it does not work. And I am not sure what xml tags I should use so that the poem is formatted in multiple lines based on the poem text flow.
The code template for the xml fed to RSS feed is as follows:
<?xml version="1.0" encoding="windows-1252"?>
<title>title text </title>
<description> Description Text</description>
<copyright>Quotes And Poem (c) 2004 - 2007</copyright>
Poem Text (HOW DO I CREATE LINE BREAKS FOR EACH LINE OF THE POEM)
<pubDate> Publication Date </pubDate>
<guid isPermaLink="true">Text here</guid>
I appreciate any help in resolving this issu.
In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup for greater readability. Such white space is typically not intended for inclusion in the delivered version of the document. On the other hand, "significant" white space that should be preserved in the delivered version is common, for example in poetry and source code.
A special attribute named xml:space may be attached to an element to signal an intention that in that element, white space should be preserved by applications. In valid documents, this attribute, like any other, MUST be declared if it is used. When declared, it MUST be given as an enumerated type whose values are one or both of "default" and "preserve".
You shouldn't need a <br> when you use xml:space, and <br> is HTML anyway.
You would need to use the XHTML version <br/> if you want it to be parsed properly. On the other hand, <br/> might not work anyway. As I mentioned, XHTML isn't recognized by all RSS aggregators, even if you qualify it with the proper namespace. Take out the <br> tags and see if xml:space fixed your issue. If it didn't, I suppose you could try using <br/>, though it technically wouldn't be "valid" RSS, and not all aggregators will understand what to do with it (some will even fail to parse the feed since <br/> is unrecognised).