![]() | ||
| : Creating RSS News Feeds | Español | Français | Deutsch | Italiano | |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
Creating RSS News FeedsSummaryThis article introduces the reader to the usage, and implementation of Rich Site Syndication (RSS). Source Code Inlcuded Why use RSS feeds? RSS is a standard for the notification of changes/updates to websites. It allows the user to subscribe to the feed, like a mailing list, and receive alerts when updates become available. The user may subscribe to feeds through newsreaders, such as Mozilla’s Thunderbird and 404Browser:NewsFeed. This technology enables the consumer of the feed, user, to be notified about content changes without having to constantly go back to the website only to find that no changes have been made since the previous visit. By using RSS the content provider is now able to easily notify all interested visitors. RSS can be used on almost any site. Currently, it is being used on news, government sites, and blogs. Structure of RSS feeds The structure of an RSS file is very simple. The head of the file includes information about the “channel” or the content provider, and the rest of the file includes entries of content changes or “items.” Listing one includes an example of a RSS file. Listing One: <xml/> <rss> <channel> <title>RSS Title</title> <link>RSS
File location</link> <item> <title>News Item</title> <link>News
Item URL</link> <pubDate>December
12, 2004 15:00:00</pubDate> </channel> </rss> Example of component usage. Included with this tutorial is an ASP.net web control, written by the author, which enables the dynamic creation of a RSS feed. See listing two for an example on how to useât@ the control. Listing Two: RSSComponent cFeed= new RSSComponent(“myFeed”, “a feed for mywebsite.com”, “<otherinformation>”, “http://mywebsite.com/Feed.rss”); cFeed.addNewsItem(“New website”, “http://mywebsite.com”,”The first news item”, “”); cFeed.writeToFile(“Feed.rss”);
|
| Copyright 2004 LTPB.8m.COM |