Showing posts with label CDATA. Show all posts
Showing posts with label CDATA. Show all posts

Tuesday, August 31, 2010

Php RSS 2 Writer Update (v2.1) - CDATA Enabled

The Php RSS 2.0 Writer class has been recently updated to include the option of writing CDATA in the RSS feed item title or description components. This allows the feed to be parsed even when the content within a feed item contains special characters that would usually be parsed as an XML element, such as HTML code. When the xml parser reaches a CDATA tag, the content within will be ignored, allowing special characters to be included in the content. Please note that you are still required to encode any special character that appears in a CDATA tag, which is commonly '<', '>' and '&' characters.

View more details about the update and the Php RSS 2 Writer class file. Further information is also available ablut the recent updates to the class as well as general usage information for the class. The class file and sample constructor is also available for downloaded on this page.

The CDATA update was prompted by an issue someone was having when trying to generate an RSS Feed using the class. View the RSS Feed CDATA Troubleshooting post.

[Update: The Php RSS 2.0 Writer class that this post refers to has been upgraded, and has also moved to a dedicated site.  The updated package is now Php FeedWriter, which supports output of multiple RSS formats and also Atom 1.0.  A tutorial is available on this blog to help with: Creating a custom feed using Php FeedWriter.  A link to download the package for free is available from the post also. ]

Wednesday, August 25, 2010

RSS Feed CDATA Troubleshooting

RSS2Writer v2.1 has been updated to v3.0 beta.  The new version can be downloaded at the Php FeedWriter website:  http://PhpFeedWriter.WebmasterHub.net/

Php FeedWriter (v3.0 beta) now provides the ability to output to various feed formats.  Php FeedWriter can currently generate Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91 compatible feeds

View more information about Php FeedWriter, including online documentation.  For information about the latest update and release, see the article Php FeedWriter 3.0 (beta) Released.

A tutorial demonstrating how to build a feed using Php FeedWriter is also available on this blog:
How to Generate Feed Using Php (Atom 1.0 and RSS 2.0 Compatible)



RSS Feed CDATA was not working properly in the Php RSS 2.0 Writer class when trying to generate an RSS feed, as CDATA was not initially supported by the class. When the CDATA tags were included using '<![CDATA[' . $content . ']]>' as the value in the description element of the field, it didn't work.
Understood
This website is using cookies. More details