How to create RSS feeds for your site in .Net?Really Simple
Syndication (RSS) is a simple way of sharing information on the web. RSS
has become popular to share information from any website. There are tools
available to consume the RSS feeds from the websites. Anyhow to utilize
this method of sharing knowledge over the web you need to know how to
create RSS feeds for your site so that other can use that to get information
from your site.
Basically
RSS is an XML document with special tags meant for giving links to the
contents that are fed from a website. A simple RSS document would look
like: <rss version="2.0"> The root
tag of the XML document is the <rss> tag and the root node is the
<channel> tag and there can be other channel tags in
the document. The elements within the channel node are title,
link, description, copyright, generator, and item. The item tag contains
title, link, description and pubdate. In the above document the tags above
the item tag pertains to that of the site that gives the rss feed and
the tags within the item tag are that of the item that is shared with
the users. You can write a method to fill the item tag with information
from a database. If you can achieve this you can create the RSS feed from
your website. You can use the XMLWriter class and generate an OutputStream
which gives information for the tags within the item element. The following
code snippets gives you an idea on how to write a class to generate RSS
feeds. Public Class
cRss The method
PubRss does the job of publishing the RSS feed. You can write a function
that returns a DataSet that contains information for the tags in the item
element of the RSS document. Once you write a function for returning a
dataset, you can write the following code to finish the job of publishing
the RSS feed in the Page Load event of the aspx page. Private Sub
Page_Load(ByVal sender As System.Object, Thus you
can try creating an RSS feed for your site so that other can consume that
RSS feed.
_______________________________________________________________________
FREE
Subscription
Subscribe
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________ |