XML technologies / RSS & Atom / RSS 1.0 and RSS 1.1 / Basic structure of an RSS 1.0 document

(Excerpt from "Newsfeeds with RSS and Atom" by Heinz Wittenbrink, published by Galileo Press, 2005)

Even the simplest RSS document uses elements from different vocabularies. The following sample document contains the information from the sample document for RSS 2.0 on the page Basic structure of an RSS 2.0 document.

<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <channel rdf:about="http://www.celawi.eu/webtrends">
      <title>Webtrends</title>
      <link>http://www.celawi.eu/webtrends.html</link>
      <description>Nachrichten über kommerzielle Websites und Online-Werbung</description>
      <items>
         <rdf:Seq>
            <rdf:li rdf:resource="http://www.celawi.eu/webtrends/20040415_01"/>
            <rdf:li rdf:resource="http://www.celawi.eu/webtrends/20040415_02"/>
         </rdf:Seq>
      </items>
   </channel>
   <item rdf:about="http://www.celawi.eu/webtrends/20040415_01">
      <title>Ask Jeeves jetzt auch in Spanien</title>
      <link>http://www.celawi.eu/webtrends/20040415_01.html</link>
      <description>Ask Jeeves startete am 5. April mit der Betaversion eines neuen Such-Service für Spanien...</description>
   </item>
   <item rdf:about="http://www.celawi.eu/webtrends/20040415_02">
      <title>Bitkom-Studie: Paid Content in Deutschland erfolgreich</title>
      <link>http://www.celawi.eu/webtrends/20040415_02.html</link>
      <description>Kostenpflichtige Online-Inhalte werden immer besser angenommen:...</description>
   </item>
</rdf:RDF> 

Code example: simple RSS 1.0 document

This document has a simple structure. However, it is more complex than that of the RSS 2.0 document with identical content on the page "Basic structure of an RSS 2.0 document". The following illustration shows the XML tree structure:

The document and diagram clearly show the main differences from RSS 2.0. Both result from RSS 1.0 following the rules of the RDF/XML syntax:

Simple RSS 1.0 document

Figure: simple RSS 1.0 document

Namespaces

Every RSS 1.0 document consists of elements from different XML vocabularies. At least the RDF/XML vocabulary and the RSS 1.0 core element vocabulary must be used in every RSS 1.0 document. Besides the root element rdf:RDF, the RDF/XML vocabulary includes the attribute rdf:about and the element rdf:seq, introduced below. The names of elements in the RSS core vocabulary are already familiar from RSS 2.0, for example channel and item. Most RSS 1.0 documents also contain elements from other vocabularies, such as the elements from the Dublin Core Metadata Set in the example above.

   

 

 

 

Creative Commons license
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

back to top