O'Reilly logo

XML Hacks by Michael Fitzgerald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Create an RSS 0.91 Document

Create an RSS 0.91 document using a template, and gain a little essential background in RSS history.

RSS 0.91 is probably the most popular RSS format because it is the oldest and is so simple, which, as with so many other technologies, encourages adoption by the teeming masses. Here is a minimal 0.91 document, containing all the required elements and a few optional ones (it is named news.xml in the file archive):

<rss version="0.91">
 <channel>
  <title>Wy'east Communications</title>
  <link>http://www.wyeast.net</link>
  <description> Wy'east Communications is an XML 
     consultancy.</description>
  <language>en-us</language>
  <image>
   <url>http://www.wyeast.net/images/mthood.jpg</url>
   <title>Wy'east</title>
   <link>http://www.wyeast.net</link>
  </image>
  <item>
   <title>Legend of Wy'east</title>
   <link>http://www.wyeast.net/wyeast.html</link>
   <description>The Native American story behind the name
       Wy'east.</description>
  </item>
 </channel>
</rss>

RSS 0.91 doesn’t declare a namespace for its elements. The rss element is the document element. It has a required attribute, version, whose value is 0.91. This element must have exactly one channel child and one or more item children. Following the channel element are these elements:

title

A descriptive title for this channel. This should usually be the same as the content of the HTML element title on your main site page (such as index.html). The maximum number of characters allowed here is 100.

link

A URI for the channel. This should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required