The Anatomy fo an RSS Feed
The Anatomy fo an RSS Feed
The Anatomy of an RSS Feed
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
| 1 | <rss version="2.0"> |
| 2 | </rss> |
The child of the <rss> element is the <channel>. This element is the containing element for the important data or content within the feed.
| 1 | <rss version="2.0"> |
| 2 | <channel> |
| 3 | </channel> |
| 4 | </rss> |
| 5 |
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>.
1. language – The language of the content in the channel. 2. copyright – The copyright notice for the content of the channel. 3. managingEditor – An e-mail address for the editorial content producer. 4. webMaster – An e-mail address for the webmaster. 5. pubDate – A date that represents the publication date for the content in the channel. 6. lastBuildDate – The last date and time that the content was changed. 7. category – Allows for the ability to add one or multiple categories that a channel belongs to. 8. generator – The program that created the channel. 9. docs – URL for the documentation for the format of the RSS feed. 10. cloud – Provides a process to register with a “cloud” that will be used to notify about updates. 11. ttl – Stands for time to live, which tells the length of time the channel can be cached. 12. image – Specifies an image file to be displayed in the channel. 13. rating – PICS rating for the channel. 14. textInput – A text input field that can be displayed with the channel. 15. skipHours – Tells aggregators to skip for specified hours. |
Following is an example of the RSS feed data that can be found in a blog.
| 1 | <rss version="2.0"> |
| 2 | <channel> |
| 3 | <title>Kris Hadlock: Designing with Code</title> |
| 4 | <link>http://www.krishadlock.com/blog/index.php</link> |
| 5 | <description/> |
| 6 | <copyright>Copyright 2006 Kris Hadlock</copyright> |
| 7 | <language>en-us</language> |
| 8 | <lastBuildDate>Fri, 01 Sep 2006 23:36:55 +0000</lastBuildDate> |
| 9 | <image> |
| 10 | <url/> |
| 11 | <title/> |
| 12 | <link/> |
| 13 | </image> |
| 14 | </channel> |
| 15 | </rss> |
No comments:
Post a Comment