There are two main branches of formats in the RSS family. RSS 2.0 is the current inheritor of the line of XML formats that includes RSS versions 0.91, 0.92, 0.93, and 0.94. The “RSS 1.0” section covers the other branch. You can find the specification for RSS 2.0 here, from which you can get the details of required and optional elements and attributes:
http://cyber.law.harvard.edu/rss/rss.html
Here are some key aspects of RSS 2.0:
The root element is <rss>
(with the version="2.0"
attribute).
The <rss>
element must contain a single <channel>
element, which represents the source of the feed.
A <channel>
contains any number of <item>
elements.
A <channel>
is described by three mandatory elements (<title>
, <link>
, and <description>
) contained within <channel>
.
An <item>
element is described by such optional elements, such as <title>
, <description>
, and <link>
. An item must contain at least a <title>
or <description>
element.
The tags in RSS 2.0 are not placed in any XML namespaces to retain backward compatibility with 0.91–0.94.
Here is an example of an RSS 2.0 feed with two <item>
elements, each representing a new book. Each description contains entity-encoded HTML.
<?xml version="1.0" ?> <rss version="2.0"> <channel> <title>Apress :: The Expert's Voice</title> <link>http://www.apress.com/</link> <description> Welcome to Apress.com. Books for Professionals, by Professionals(TM)... with what the professional needs to know(TM)</description> <item> <title>Excel 2007: Beyond the Manual</title> <link>http://www.apress.com/book/bookDisplay.html?bID=10232</link> <description> <p><i>Excel 2007: Beyond the Manual</i> will introduce those who are already familiar with Excel basics to more advanced features, like consolidation, what-if analysis, PivotTables, sorting and filtering, and some commonly used functions. You'll learn how to maximize your efficiency at producing professional-?looking spreadsheets and charts and become competent at analyzing data using a variety of tools. The book includes practical examples to illustrate advanced features.</p> </description> </item> <item> <title>Word 2007: Beyond the Manual</title> <link>http://www.apress.com/book/bookDisplay.html?bID=10249</link> <description> <p><i>Word 2007: Beyond the Manual</i> focuses on new features of Word 2007 as well as older features that were once less accessible than they are now. This book also makes a point to include examples of practical applications for all the new features. The book assumes familiarity with Word 2003 or earlier versions, so you can focus on becoming a confident 2007 user.</p> </description> </item> </channel> </rss>