stergosz
stergosz

Reputation: 5860

php XML RSS html code problem

I am trying to add a RSS feed into my pages and i am stuck in where i add the HTML code and if there any changes in the normal html codes for images , line breaks and so on.

i tried pasting the following code which is from wikipedia:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
        <title>RSS Title</title>
        <description>This is an example of an RSS feed</description>
        <link>http://www.someexamplerssdomain.com/main.html</link>
        <lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
        <pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>

        <item>
                <title>Example entry</title>
                <description>Here is some text containing an interesting description.</description>
                <link>http://www.wikipedia.org/</link>
                <guid>unique string per item</guid>
                <pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
        </item>

</channel>
</rss>

but i dont know where to put the html code.

Upvotes: 0

Views: 355

Answers (1)

sudhir chauhan
sudhir chauhan

Reputation: 872

I am not sure what you want to do with HTML code in RSS XML and I am assuming you need to send HTML in the description you can wrap HTML in CDATA in description element

<description><![CDATA[" and ends with Here is some text containing an interesting description.]]></description>

Upvotes: 4

Related Questions