Wednesday, January 30, 2008

RSS Feed Reader - ASP.NET Control to Read RSS Feeds - Display RSS Feed on Website

Microsoft's Coding4Fun website has a small article about creating an RSS Feed Reader as a control so that you can read RSS Feeds from other websites and display the links on your website. Don't use this as a means to steal other people's intellectual property, but rather as a means to learn about XML and use in a positive manner.


From the Coding4Fun website:


“As a quick primer, Wikpedia describes RSS as "short descriptions of web content together with links to the full versions of the content. This information is delivered as an XML file called an RSS feed, webfeed, RSS stream, or RSS channel. In addition to facilitating syndication, RSS allows a website's frequent readers to track updates on the site using a news aggregator." (For the full entry, see RSS on Wikpedia).


To get started, we'll look at a simple RSS feed reader you can build using Visual Web Developer 2005 Express Edition. I'm going to build a control that fetches an RSS feed from a site of interest and organizes that content for display on a web page. Of course, you could also build an RSS feed reader as a Windows application, or take advantage of any one of a number of free RSS client applications available (e.g., RSS Reader or SharpReader) if your aim is to aggregate content for your own personal consumption. Using syndicated content in a Web application has a different purpose, however, as it allows you to extend the content you create yourself and enrich the user experience of visitors to your site.“ - Coding4Fun

It is a very cool article showing how you can utilize the HTTPWebRequest and the DataSet's ReadXML method to read in RSS Feed XML and display the various parts of the XML by drilling into the DataSet's tables, rows, and columns fields. Very cool.