Generating a valid Sitecore RSS feed (and other XML)

January 9th, 2010

The newer Sitecore (6.2+) versions are able to automatically generate RSS feeds. If you want to create your custom feed or are using a older version of Sitecore you can use this code as a guideline. The supplied code is an .ASHX handler to generate a valid RSS feed. I’m using the .NET XmlTextWriter class to help us out a little. This example takes a itemLanguage parameter to get the right content language. Please keep in mind that the code can be structured better, its just an example. With some editing you can also use this for other types of XML output. The generated RSS passes validation and most browsers recognize it as being RSS.

Check out the example code.

0 C: Sitecore T:

Where am I?

You are browsing posts with the following tag: rss.

Click here to return to the blog