nolachrymose
12-13-2003, 03:14 AM
I am working on a script to read my RSS feeds, and I've come across a problem: when I append the contents of a description element of an item element, for some reason it is parsed as text only, and all the HTML tags appear as text.
For instance, say I have an XML file like this:
<?xml version="1.0"?>
<rss version="0.91">
<channel>
<title>rss feed</title>
<link>http://www.blah.com</link>
<description>a nice little rss feed</description>
<language>en-us</language>
<item>
<title>Blah</title>
<description>
<p>foo</p>
<p>bar</p>
</description>
<link>http://www.blah.com/ref.htm#blah</link>
</item>
</channel>
</rss>
I take the description element (colored in red, above), and append it to a division, and when I append it to my container, it appears as "<p>foo</p><p>bar</p>" as opposed to this:
foo
bar
Any help is greatly appreciated. Thanks!
Happy coding! :)
For instance, say I have an XML file like this:
<?xml version="1.0"?>
<rss version="0.91">
<channel>
<title>rss feed</title>
<link>http://www.blah.com</link>
<description>a nice little rss feed</description>
<language>en-us</language>
<item>
<title>Blah</title>
<description>
<p>foo</p>
<p>bar</p>
</description>
<link>http://www.blah.com/ref.htm#blah</link>
</item>
</channel>
</rss>
I take the description element (colored in red, above), and append it to a division, and when I append it to my container, it appears as "<p>foo</p><p>bar</p>" as opposed to this:
foo
bar
Any help is greatly appreciated. Thanks!
Happy coding! :)