RSS specifications:
Http://cyber.law.harvard.edu/rss/rss.html
Code for generating RSS content using XmlWriter:
// Retrieve the content from the indexed database to generate different rss feeds. The data table in mycon should include at least the title, description, link, pubDate, and author fields.
public void DB2Rss(OleDbConnection mycon, string XmlFile)
{
XmlTextWriter objX = new XmlTextWriter(Server.MapPath(XmlFile), System.Text.Encoding.GetEncoding("GB2312"));
objX.Formatting = Formatting.Indented;
objX.WriteStartDocument();
objX.WriteStartElement("rss");
objX.WriteAttributeString("version", "2.0");
objX.WriteStartElement("channel");
ObjX. WriteElementString ("title", "rss of shredded fish ");
ObjX. WriteElementString ("description", "useful stuff for collecting and organizing shredded fish. ");
ObjX. WriteElementString ("copyright", "Copyright (C) 2007 spiced fish ");
ObjX. WriteElementString ("ttl", "5"); // rss Update Time
objX.WriteElementString("pubDate", DateTime.Now.ToString());
String strCom = "******"; // ***** indicates the specific SQL statement. select the title, description, link, pubDate, and author
OleDbCommand myCommand = new OleDbCommand(strCom, mycon);
OleDbDataReader dr = myCommand.ExecuteReader();
while (dr.Read())
{
objX.WriteStartElement("item");
objX.WriteElementString("title", dr.GetString(0));
objX.WriteElementString("description", dr.GetString(1));
objX.WriteElementString("link", dr.GetString(2));
objX.WriteElementString("pubDate", dr.GetDateTime(3).ToString());
objX.WriteElementString("author", dr.GetString(4));
objX.WriteEndElement();
}
dr.Close();
objX.WriteEndElement();
objX.WriteEndElement();
objX.WriteEndDocument();
objX.Flush();
objX.Close();
}
However, note the encoding attribute.
C # generate a common RSS class for netizens:
Http://wyf.javaeye.com/blog/400449
ASP. net rss ToolKit open-source framework:
Http://www.codeplex.com/ASPNETRSSToolkit
RSS. NET open-source framework:
Http://sourceforge.net/projects/rss-net/
Net open-source RSS and RDF tools
RSS. NET
RSS. NET is an open-source. NET class library that operates RSS feeds. It provides a reusable Object Model for parsing and writing RSS feeds. It is fully compatible with RSS 0.90, 0.91, 0.92, and 2.0.1.
Rss Bandit
Rss Bandit is an open-source RSS reader developed by C #. It has built-in multi-country languages and supports Atom 1.0 and various other RSS feed formats. It features a beautiful screen, paging browsing, and high flexibility in software details. Its operation screen is intuitive and easy to understand. It has a good Command mode and ListViewEx for users to quickly get started.
View times (35) | details
Aggie
Aggie is a news collector. It is a desktop application that can download the latest news and present it on a web page.
FeedExpress
FeedExpress allows you to subscribe to some RSS/RDF resources, such as Subscriptions in FeedExpress. It is the same as Outlook Express that allows you to subscribe to some newsgroups.
NRss
NRss is an open-source class library provided for the Microsoft. NET Framework and Mono. It reads RSS Feeds elements and then presents object relationships in a tree structure.
Atom. NET
Atom. NET is an open-source class library fully developed using C #. It aims to provide convenient methods to operate Arom Feeds. It provides an object model for writing and parsing Atom Feeds. It is only compatible with the 0.3Atom specification and can run in Microsoft. NET 1.x, Mono 0.29 or later versions.
Mail2rss
Mail2rss is a web service under. NET. It checks your inbox and returns an RSS feed containing the message in the inbox when you request it. It is an open-source project fully developed using C # and does not use any third-party controls.
GtkSharpRSS
GtkSharpRSS is an open-source RSS and RDF client developed by C #. It is used for Mono, Gtk #, and RSS. NET. It can also display content through a window Embedded in Mozilla.
IPodder. NET
IPodder. NET is an open-source media collector written in C #. It can automatically download music from the Internet and easily select your favorite among thousands of music. After you use it to set up the RSS feeds subscription, as long as there is an update to the program, it will automatically download, you do not have to waste a lot of time manually download. It also integrates iTunes to create a playlist and iPod synchronization function. You can use Apple iTunes or Media Player to play the video, or you can