www.htmlgoodies.com/beyond/xml/article.php/3723076
|
By Kris Hadlock January 22, 2008 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>. 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:
ConclusionRSS 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 AuthorKris Hadlock has been a contract Web developer and designer since 1996. He is the author of Ajax for Web Application Developers and has been a feature writer for numerous Web sites and design magazines. To learn more about Kris, visit his Web site at www.krishadlock.com This article originally appeared on WebReference.com |