Developing an ASP.NET AJAX Based RSS Reader
page 2 of 10
by Xianzhong Zhu
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 38455/ 74

Introduction to RSS

RSS is an XML-based format that allows the syndication of lists of hyperlinks, along with other information, or metadata, that help viewers decide whether they want to follow the link.

This allows a person's computer to fetch and understand the information, so that all of the lists that he is interested in can be tracked and personalized for him.  It is a format that is intended for use by computers on behalf of people, rather than being directly presented to them (like HTML).

To enable this, a Web site will make a feed, or channel, available, just like any other file or resource on the server.  Once a feed is available, computers can regularly fetch the file to get the most recent items on the list.  Most often, people will do this with an aggregator, a program that manages a number of lists and presents them in a single interface.

Feeds can also be used for other kinds of list-oriented information, such as syndicating the content itself (often weblogs) along with the links.  However, this tutorial focuses on the use of RSS for syndication of links.

Here is an example of a minimal RSS 2.0 feed:

Listing 1

<?xml version="1.0"?>
<rss version="2.0">
            <title>Example Channel</title>
            <description>My example channel</description>
                  <title>News for September the Second</title>
                  <description>other things happened today</description>
                  <title>News for September the First</title>

Currently, nearly all web sites provide support for RSS 2.0.  From the above listing we can see that a RSS file is mainly composed of nodes, such as rss, channel, item, etc.  Here, node rss specifies the namespace to abide by; node channel represents one category in some blog or new group, while item corresponds to the main info for users to view, including titles, hyperlinks, pub-date, etc.  The following table lists the standard elements that constitute an RSS file.

Table 1: Elements within a RSS 2.0 channel




The title of this channel


The hyperlink of the web site for the channel to be linked to


The description information for this channel








The information of the main manager of the web site






The image information within this channel

Note you can refer to this address for all the elements contained in a RSS 2.0 file.

Dmitry Robsman's ASP.NET RSS Toolkit

In this article we will seek help to the famous open source RSS toolkitRssToolkit (authored by Microsoft Dmitry Robsman, which can be downloaded from to serve as an agent between this sample application and the RSS channel information because currently there are many versions available for RSS subscription, such as 0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0, with various small differences between them.  Also, to directly work with the different versions, you have to exert tremendous effort.

Concretely, this toolkit supplies the following main features:

·         RssDataSource control to consume feeds in ASP.NET applications:

1) Works with ASP.NET data bound controls

2) Implements schema to generate columns at design time

3) Supports auto-generation of columns at runtime (via ICustomTypeDescriptor implementation)

·         Caching of downloaded feeds both in-memory and on-disk (persisted across process restarts)

·         Generating strongly typed classes for feeds (including strongly typed channel, items, image, handler) based on a feed URL (the toolkit recognizes RSS, Atom and RDF feeds) or a file containing a sample feed and allowing programmatically download (and creation) of feeds using strongly-typed classes.

So much for the RSS introduction!  Let us now focus on our main topic.

View Entire Article

User Comments

Title: Trouble with Sample Code   
Date: 2009-04-09 3:28:34 PM
Hello Xianzhong, I recently downloaded your sample code, did a little alteration to it and then compiled it. When I went to view it in a browser, after clicking on the "Add the RSS info" button, I get a javaScript error.

var datatable =g_RSSNameList.get_data(); throws a null reference exception.

After 2 days of trying to debug this, I am finally contacting you. Any ideas on how to troubleshoot this?

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-15 5:52:15 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search