The Joy Of RSS, Part 3: The History & Technology Of RSS
By Gerard McGarry on 13th August 2005, filed in Internet Technologies. You can leave a response below.
Hungry for more RSS information? You???ve been through the introduction, then found out about RSS readers and subscribing to feeds? OK, let???s move on.
Part 3 in this series (The Joy Of RSS) is by far the most technical! In this part, we???ll be looking at the background to RSS and some of the code structure behind an RSS feed.
The History Of RSS
RSS was first developed by Netscape in 1999 as a format to distribute up-to-date information such as news articles. After doing some amount of work developing the format, they abandoned it.
At the same time, a company called Userland began building on the RSS format and according to RSS Specifications website at one point Netscape and Userland both released an RSS version 0.91.
Userland continued development of RSS, eventually arriving at version 2.0, which is the most commonly used format today.
The confusing thing about the versioning of RSS is that a number of different individuals and companies were involved in developing the format and there have been conflicts of versions, abandonment of other versions and the more complicated version 1.0 (developed by O???Reilly).
The problem with having multiple and widely differing formats was that it made standardisation difficult. Developers of RSS reading software would have to choose which version to support, and there were commercial issues about developing on the basis of Userland???s specification (presumably to do with licensing the technology or lack of control over how the standard develops).
In order to resolve this, the specification was given to Harvard Law School, who as a non-commercial organisation would ensure that the specification was developed without the commerciality issues. Harvard Law School released the specification under a Creative Commons (http://www.creativecommons.org) license in July 2003.
Structure: RSS Is XML Based
RSS adheres to an XML-type structure.
???Keep in mind that an RSS feed is nothing more than an XML file that contains certain required tags.??? 4GuysFromRolla.com
The first line in the RSS file is an XML declaration, identifying this as an XML document.
<?xml version="1.0" encoding="ISO-8859-1"?>
The XML declaration is then followed by the root node of the document. Note the version attribute here. This opening tag will be terminated at the end of the document with </rss>.
<rss version="2.0">
Following the RSS node, a second node, channel contains the feed information, beginning with a series of tags which describe the source of the feed:
<channel> <title>Scribble Designs</title> <link>http://www.scribbledesigns.net</link> <description>Web Design in Northern Ireland.</description> <pubDate>Thu, 21 Jul 2005 06:29:46 +0000</pubDate> <language>en</language>
When the feed description is complete, each article is defined as an item.
<item> <title>The Joy Of RSS</title> <link>http://www.scribbledesigns.net/2005/07/21/the-joy-of-rss/</link> <comments>http://www.scribbledesigns.net/2005/07/21/the-joy-of-rss/#comments</comments> <pubDate>Thu, 21 Jul 2005 06:20:23 +0000</pubDate> <dc:creator>Gerard McGarry</dc:creator> <category>Internet Technologies</category> <guid>http://www.scribbledesigns.net/2005/07/21/the-joy-of-rss/</guid> <description>In my second article about RSS, . . ..</description> <content:encoded>Welcome to the second article in the Joy Of RSS series, which covers RSS reader software and how to subscribe to an RSS feed. If you’re not sure what RSS is, read the introductory article.</p> <h2>What Software Do I Need To Use RSS?</h2> <p>In order to view RSS feeds, you need to have some software that is capable of receiving RSS information.</p> <p>This can be software that exists on your machine, such as a web browser, email program or a standalone RSS Reader program. Alternatively (and my favourite), you can sign up to an online RSS service which you can access from anywhere. </p> </content:encoded> </item>
Each <item> contains information about the article: title, description, date of article, a backlink to the related page on the website, etc. Not all of these are required tags. However, most blogging platforms automatically generate RSS files and this additional information can be useful.
The number of items in an RSS feed varies. Regardless of the number of items, when the last <item> has been defined, the channel tag is closed and then the rss tag is closed:
</channel> </rss>
Writing An RSS File And Placing It On Your Website
You can create an RSS feed manually by creating a file with this structure in a text editor such as notepad. Save it as rss.xml and upload it to your website. You can test your RSS file with a service such as FeedValidator to confirm that it is valid.
Take care when placing your RSS file. If people subscribe to your website, their RSS reader will always look to this location for updates. If you move or delete the RSS file, your subscribers won’t receive updates and you might lose visitors to your site as a result!
If you have a dynamic site, and your website content is stored in a database, it’s possible to automatically generate an RSS feed which updates each time a new article is added. Blogging software such as WordPress has this functionality built in.
Anyway, that’s all on the subject of RSS for the moment. If you have any questions, please leave them via the comments section.







