Creating Your Own RSS Feed
Most of you must be familiar with the term RSS which stands for Really Simple Syndication. Have you ever thought of how to write your own RSS feed? Did you say NO!!! C'mon It's simple. Let me show you how to create a simple one.
Basics of RSS
A RSS feed contains what are reffered as Items. Each item contains an title, description and a link to the source. The title and description should be written to describe the content and the link should reference the webpage that contains the actual content.
RSS is a flavor of XML. Like html, the xml file uses open and close tags to designate the title, description and link. Tags are enclosed in brackets <>, like standard html and the close tag contains a forward slash /.
An RSS feed is a series of items, which are chained together to creae what is called a "Channel".
Writing the RSS feed
The following is what an item in a xml file looks like:
<item>
<title>Generating Excel Files With JSP</title>
<description>This article shows how to create an Excel file using JSP.</description>
<link>http://developerparadise.blogspot.com/2006/03/
generating-excel-files-with-jsp.html</link>
</item>
The channel appears at the top of the file and tells people how the items relate to each other. Just like items, channels also use title, description, and link tags to describe it's content. The open channel tag occurs before the first item and the closing channel tag occurs right after the last item.
<channel>
<title>Developer Paradise</title>
<description>The place for techies</description>
<link>http://developerparadise.blogspot.com</link>
<item>
<title>Generating Excel Files With JSP</title>
<description>This article shows how to create an Excel file using JSP.</description>
<link>http://developerparadise.blogspot.com/2006/03/
generating-excel-files-with-jsp.html</link>
</item>
</channel>
Finally you will need to designate the file by indicating it is an XML file by inserting following xml and rss definition tags at the beginning and at the very end.
<?xml version="1.0"?>
<rss version="2.0">
The completed RSS feed will looks like this.
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Developer Paradise</title>
<description>The place for techies</description>
<link>http://developerparadise.blogspot.com</link>
<item>
<title>Generating Excel Files With JSP</title>
<description>This article shows how to create an Excel file using JSP.</description>
<link>http://developerparadise.blogspot.com/2006/03/generating-excel-files-with-jsp.html</link>
</item>
<item>
<title>Changing screen resolution using Delphi</title>
<description>This article shows how to build a small program to change your screen resolution.</description>
<link>http://developerparadise.blogspot.com/2006/03/changing-windows-resolution-using.html</link>
</item>
</channel>
</rss>
As my math teacher used to say, check your work! Once your file is complete and uploaded enter it into the feed validator at http://feedvalidator.org to check your syntax.
Viewing the RSS
Now you any RSS viewer such as "Feed Reader" or "Google Desktop" to view your RSS feed.
Oh... Forgot to say.. you must save the RSS file using .RSS extension or .XML extension.
That's all.. Let your friends read your website updates via RSS.
Have fun!
/Cheers,
-MadGuy

1 Comments:
Hay guys,
I'm sorry, about the & # 62; mark. It's bit hard to handle html/xml syntax with the google 4blogger. Sry abt inconvenience. please replace the above symbol with >. (forward arrow head)
/Cheers,
-MadGuy
Post a Comment
Links to this post:
Create a Link
<< Home