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:

§ Place your comments here

  • Welcome!

    I'm Vincent van Middendorp a webdeveloper from The Netherlands. This site is all about sharing experiences & tips. You can expect small posts and articles about all kinds of subject matters that have to do with: the Sitecore CMS, Windows 7, XSL, ASP.NET, Html,CSS and other random geek stuff. Don't expect this site to be updated dialy :) Enjoy!

    I'm currently working at Evident Interactive in Utrecht.

    This is a subdomain of my personal dutch site Digisaru.com (warning: this site may contain brief nudity or songs with explicit lyrics).

  • Categories