Got RSS?
Introduction
RSS, Real Simple Syndication, is currently in version 2.0 based on the Userland
specification. This article will go over the uses of the XML dialect, the
channel elements, and a few examples of RSS channels. Lets get started.
Uses of RSS Feeds
One of the main uses of RSS is blogging. Weblogs allow a user to write about
their lives, careers, research topics, or what the ending of a popular movie is
like before others watch it. RSS can also be used to describe sections of a
site, articles, forums, or events in a conference.
RSS can be viewed in several different fashions. The two main types of viewers
are websites and news aggregators. News aggregators, such as RSS Bandit, are
typically client-side applications that subscribe to feeds and allow the user
to read them without surf page to page. Web sites that are based on RSS feeds
typically use XSLT to render HTML.
RSS Channel Elements
An RSS feed starts with the tag
<rss>. This tag has the version attribute
that the document is written for. Inside the
<rss>
tag you will have a
<channel>
tag. The channel tag has elements that describe the channel and the items
within the channel. Here is a small example of an RSS channel.
<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>RSS Example</title>
<link>http://rss.jjulian.com</link>
<description>This is the first RSS example.</description>
<item>
<description>Hello World!</description>
</item>
<item>
<description>Hello Developer!</description>
</item>
</channel>
</rss>
|
Next we will describe the elements that belong to the
<channel>
element.
-
title
*
- the name of the RSS channel.
-
link
*
- the URL for the website that RSS is describing.
-
description
*
- a brief explanation of the information the feed contains.
-
language - the language code the feed uses.
-
lastBuildDate - the last time the feed was manipulated.
-
docs - the documents that define the version of RSS the feed is using.
-
generator - the name of the tool used to create the feed.
-
category - the category of the content in the feed.
-
item - an item of the feed
*
= required element.
Next we will describe the elements that belong to the
<item>
element.
-
title - the name of the channel item.
-
link - the URL of the item
-
description - the content of the item.
-
pubDate - the date the item was published.
-
guid - the unique identifer for the item.
-
author - the name of the writer.
-
comments - the URL to a comments page for the item.
-
category - the category of the content in the item.
Example of My RSS Feed
<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>Jeff Julian's Blog</title>
<link>http://blog.jjulian.com</link>
<description>Welcome to Geekdom, can I take your order?</description>
<language>en-us</language>
<lastBuildDate>Fri, 16 May 2003 22:55:01 GMT</lastBuildDate>
<docs>http://backend.userland.com/rss</docs>
<generator>Jjulian.com RssMaster v1.0.0</generator>
<category domain="blog.jjulian.com">General</category>
<managingEditor>jjulian2@mac.com</managingEditor>
<webMaster>jjulian2@mac.com</webMaster>
<ttl>60</ttl>
<item>
<title>TechEd, here I come!</title>
<description>
Well I bit the bullet and decided to send myself to
<a href="http://www.microsoft.com/usa/teched/home.asp">TechEd 2003</a>
in Dallas, Texas. If anyone who reads this is going as well, please add a comment
(my revolution was a bust) and maybe we can get together.
</description>
<pubDate>May 13 2003 8:14PM</pubDate>
<guid>84b4ad56-01c4-44ae-9437-23eb21c6fa7c</guid>
<category>.Net</category>
<author>Jeff Julian</author>
<comments>http://www.jjulian.com/BlogItem.aspx?Guid=84b4ad56-01c4-44ae-9437-23eb21c6fa7c</comments>
</item>
<item>
<title>GeeksWithBlogs.com/net</title>
<description>
Last night I decided to buy the domains Geekswithblogs.com
and geekswithblogs.net. I *planning* on opening up my blog
system to help others out. I don't want to compete with
<a href="http://www.dotnetweblogs.com">Dotnetweblogs</a>,
but allow people the write about whatever they want. I know that there
are several people who want to write about their lives and that is the
beauty of blogs, you can, but it seems that
<a href="http://www.dotnetweblogs.com">Dotnetweblogs</a> is
semi-moderated. Hopefully I can get off my butt, get hosting, and get it
running.
</description>
<pubDate>May 11 2003 11:57AM</pubDate>
<guid>d1d90c8a-7a8b-4f85-b94c-73baa9a3355a</guid>
<category>General</category>
<author>Jeff Julian</author>
<comments>http://www.jjulian.com/BlogItem.aspx?Guid=d1d90c8a-7a8b-4f85-b94c-73baa9a3355a</comments>
</item>
</channel>
</rss>
|
Conclusion
Even though this article is not specifically over .NET, RSS is gaining tons of
popularity and is a very useful tool. RSS can be used for several different
uses, but the most adopted use is blogging. To view my most current RSS feed,
go to http://jjulian.geekswithblogs.com/Rss.aspx.
To view my blog, go to http://jjulian.geekswithblogs.com/Blog.aspx.