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

The Anatomy of an RSS Feed

By

Social Bookmark

UNIX System Administrator - SUN Solaris, Veritas, EMC, Shell Scripting, SAN (NYC)
Next Step Systems
US-NY-New York

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
Use Web Caching to Make Your Web Site Faster
Creating an Online Shopping Cart Mechanism in PHP
Log JavaScript Errors Using an AJAX-driven Web Service
internet.com site name
Configuring Granular Settings for a Database Level Audit
The Perils of a Web 2.0 Transition on Your Business Processes
Facebook Redesigns Site —Again — Nears 400M Mark



The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers