RSS (Really Simple Syndication) is a format for syndicating (organizing) news and the content of news-like sites, including major news sites, news-oriented community sites.
RSS-aware programs called news aggregators are popular in the weblogging community (blogs). Many weblogs make content available in RSS. A news aggregator can help you keep up with all your favorite weblogs by checking their RSS feeds and displaying new items from each of them.
references:
http://www.w3schools.com/rss/rss_intro.asp
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
Free Rss APIs
Tortuga,
RSS.Net (An open-source .NET class library for RSS feeds)
RSS.Net Imlpementation: following is a .Net Generic Handler which generates the Rss feeds from Northwind database using Categories and Products tables this handler first renders the html table showing the categories, here each category link renders the Rss feeds for the products in that category.
RSS.Net Download the source code, compile the code and refer the dll Rss.Net.dll in following code.
<%@ WebHandler Language="C#" Class="rss" %>
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;
using Rss;
/// Rss Handler class provides the methods to get the Feed(s)
public class rss :IHttpHandler
{
/// constructor
public rss()
{
}
#region Implementation of IHttpHandler
public void ProcessRequest(System.Web.HttpContext context)
{
//feedCode is mapped with CategoryId eg. 1,2
int feedCode;
if (! string.IsNullOrEmpty(context.Request.QueryString["feed"]))
{
//This will make sure the page output will be text/XML and not HTML
context.Response.ContentType = "text/xml";
feedCode = int.Parse(context.Request.QueryString["feed"]);
RenderFeed(context.Response.OutputStream, feedCode);
}
else
{
//get the distict Product List
RenderFeeds(context.Response.Output);
}
}
public bool IsReusable
{
get{return true;}
}
#endregion
/// Generate the RSS Feed by fetching the values from Database
private RssFeed CreateRssFeed(int feedCode)
{
RssFeed rssFeed = new RssFeed();
DataSet ds = GetFeed(feedCode);
// Fill in our channel information:
RssChannel channel = new RssChannel();
channel.Title = ds.Tables[0].Rows[0]["ProductName"].ToString();
System.Uri uri = new System.Uri(HttpContext.Current.Request.Url.AbsoluteUri);
channel.Link = uri;
channel.Description = ds.Tables[0].Rows[0]["UnitPrice"].ToString();
channel.Generator = "Northwind";
channel.Language = "en";
channel.Copyright = "Copyright © " + System.DateTime.Now.Year + ", Northwind";
channel.ManagingEditor = "Managing.Editor@Domain.com";
channel.TimeToLive = 2;
channel.PubDate = System.DateTime.Now;
// Add items.
RssItem item;
RssGuid rssGuid;
RssSource rssSource;
foreach (DataRow drow in ds.Tables[0].Rows)
{
item = new RssItem();
item.Title = drow["ProductName"].ToString();
item.Description = drow["QuantityPerUnit"].ToString();
uri = new System.Uri(HttpContext.Current.Request.Url.AbsoluteUri + "&i=" + drow["ProductId"].ToString());
item.Link = uri;
rssGuid = new RssGuid();
rssGuid.Name = drow["ProductId"].ToString();
rssGuid.PermaLink = true;
rssSource = new RssSource();
rssSource.Name = "Northwind";
uri = null;
rssSource.Url = uri;
item.PubDate = System.DateTime.Now;
//Add Item to channel
channel.Items.Add(item);
}
rssFeed.Channels.Add(channel);
return rssFeed;
}
/// Generate the Table with Distict Feed/CategoryId
private void RenderFeeds(System.IO.TextWriter w)
{
DataSet ds = GetFeeds();
System.Web.UI.WebControls.Table table = new System.Web.UI.WebControls.Table();
System.Web.UI.WebControls.TableRow row;
System.Web.UI.WebControls.TableHeaderRow hrow;
System.Web.UI.WebControls.TableHeaderCell hcell;
System.Web.UI.WebControls.TableCell cell;
hrow = new TableHeaderRow();
hcell = new TableHeaderCell();
hcell.Text = "Category Id";
hrow.Cells.Add(hcell);
hcell = new TableHeaderCell();
hcell.Text = "Description";
hrow.Cells.Add(hcell);
hcell = new TableHeaderCell();
hcell.Text = "CategoryName";
hrow.Cells.Add(hcell);
table.Rows.Add(hrow);
foreach (DataRow drow in ds.Tables[0].Rows)
{
row = new System.Web.UI.WebControls.TableRow();
//CategoryId
cell = new System.Web.UI.WebControls.TableCell();
cell.Text = drow["CategoryId"].ToString();
row.Cells.Add(cell);
//Description
cell = new System.Web.UI.WebControls.TableCell();
cell.Text = drow["Description"].ToString();
row.Cells.Add(cell);
//CategoryName
cell = new System.Web.UI.WebControls.TableCell();
cell.Text = "" + drow["CategoryName"].ToString() + "";
row.Cells.Add(cell);
table.Rows.Add(row);
}
HtmlTextWriter writer = new HtmlTextWriter(w);
table.RenderControl(writer);
}
/// Render the RSS Feed on page
private void RenderFeed(Stream stream, int feedCode)
{
CreateRssFeed(feedCode).Write(stream);
}
/// Returns the detail associated with the CategoryId
public DataSet GetFeed(int feedCode)
{
DataSet ds = new DataSet();
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["cnnNorthwind"].ToString()))
{
conn.Open();
SqlDataAdapter adptr = new SqlDataAdapter("select * from Products Where categoryId = " + feedCode + "order by ProductId" , conn);
adptr.Fill(ds);
}
return ds;
}
/// Returns the Distinct EventCodes Detail
public DataSet GetFeeds()
{
DataSet ds = new DataSet();
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["cnnNorthwind"].ToString()))
{
conn.Open();
SqlDataAdapter adptr = new SqlDataAdapter("select * from Categories Order By CategoryId", conn);
adptr.Fill(ds);
}
return ds;
}
}
../rss.ashx

../rss.ashx?feed=1

above code is written in VS 2005, so your connection string should look like :-
<connectionStrings>
<add name="cnnNorthwind" connectionString="Server=SERVER;Database=Northwind;Persist Security Info=True;User ID=sa;Password=sa" providerName="System.Data.SqlClient"/>
< FONT>connectionStrings>
Consuming RSS feeds: RssPopper is a news aggregator add-in for Outlook & Outlook Express. News items delivered directly to Outlook as e-mails.
Please mark your valuable comments and feedbacks.