WebReference.com logo
tip archive  •   about  •   sitemap  •   contact  •   jobs  •   write for us  •   subscribe

The Anatomy of an RSS Feed

By

Social Bookmark

Shared Application Infrastructure Project Manager
The Computer Merchant, Ltd
US-MA-Boston

Justtechjobs.com Post A Job | Post A Resume


RSS has become the standard data format for communicating news, updates or any other type of information that a company or individual wants to syndicate to a large audience. The name is an acronym that stands for Really Simple Syndication, which is an XML format that consists of designated elements that are consistent for all RSS feeds and conform to the XML 1.0 specification. These elements need to stay consistent to allow for a standardized data format that RSS aggregators can then consume. In this article we'll take a look at the elements in this structure.

An RSS feed always starts with an <rss> element, which contains an attribute called version, which specifies the version of the RSS feed. Here we focus on the RSS 2.0 format because it's the most commonly used today.

The child of the <rss> element is the <channel>. This element is the containing element for the important data or content within the feed.

In order to describe an RSS feed there are some tags that can be added to the beginning of a feed. The required <channel> elements are <title>, <link>; and <description>. Optional channel elements are <language>, <copyright>, <managingEditor>, <webmaster>, <pubDate>, <lastBuildDate>, <category>, <generator>, <docs>, <cloud>, <ttl>, <image>, <rating>, <textInput>, <skipHours> and <skipDays>.

RSS feeds are grouped into items, for example an item group could be considered news stories from a news Web site, blog posts from a weblog and so on. The following feed consists of an item from a weblog, which consists of a post. Typically an RSS feed for a weblog has multiple items that represent all of the posts to the blog. Following is an example of the RSS feed data that can be found in a blog.

This feed structure is standard for a weblog, as it consists of the most commonly used elements. By taking a look at this structure you can see that it's abstract, which is why it can contain any form of information. Even though the structure is abstract you can tell by looking at the feed elements that the data is straightforward. Each item element can contain the following sub-elements in order to describe the item in detail:

You may also enjoy:

Conclusion

RSS is a format that's become the standard for syndicating information as data. This allows developers to rely on the structure of the files to create programs that can read or parse the data into a readable format.

About the Author

Kris Hadlock is the co-founder of 33Inc alongside Robert Hoekman. He is the author of Ajax for Web Application Developers and has been a feature writer for numerous Web sites and design magazines.

Original: September 14, 2006

Social Bookmark

Recent Articles

WebReference.com site name
XML and PHP Simplified
Creating a ASP.NET Contact Form
Data Filtering with PHP
internet.com site name
Intel to Host Live Nehalem Q&A
12 Tips to Troubleshoot Network File-Sharing
10 Tips for Selling on Kijiji


internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs