Creating a custom RSS for your site 

Tags: Proyectos, Internet, .NET, Community

Sometimes you need to create a custom RSS feed for your site, and the product you’re using (MOSS, Umbraco, a custom development,…) does not provide what you exactly need. So you start thinking about building your own feed.

The first attempt is to build the XML yourself, but you’ll find that it can be a little tricky, but think a while… since the RSS is an XML file you might create a XSD file so you can generate a class by using Visual Studio’s XSD.exe utility and then fill the class with your data letting the serialization part to the generated class.

Well, there is a very interesting (and working) sample in CodePlex: RSS 2.0 Schema

It has a Visual Studio project with a working sample of the generated class and an example that shows how to use it. I tested it with VS2010 and works like a charm!

Hope it helps!

 
Published by Enrique Blanco  3-Feb-10
2 Comments  |  Trackback Url
 

Comentarios


carlos comentado en Wednesday, 3-Feb-2010
on the other hand, if you can install or for example requirements of the platform provides it (MOSS). It wouldbe worth your time to check System.ServiceModel.Syndication from fx3.5 http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.rss20feedformatter.aspx


Enrique comentado en Wednesday, 3-Feb-2010
Nice point!

You can comment here:
Use <br/> for linebreaks.

Nombre:
URL:
Email:
Comentarios:
CAPTCHA Image Validation