• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. RSS 1.0 > 5.1. Metadata in RSS 2.0

Metadata in RSS 2.0

As all good tutorials on the subject will tell you, metadata is data about data. In the case of RSS 2.0, this includes the name of the author of the feed, the date the channel was last updated, and so on. In Example 5-1, the bold code is the metadata. You can remove this data, and the feed itself will still both parse and be useful when displayed as HTML. Like a Hitchcock cameo, the metadata is in the background, silent, but meaningful to those who can see it.

Example 5-1. The metadata within an RSS 2.0 feed
<rss version="2.0">
<channel>
  <title>RSS2.0 Example</title> 
  <link>http://www.oreilly.com/example/index.html</link> 
  <description>This is an example RSS2.0 feed</description> 
  <language>en-gb</language> 
               <copyright>Copyright 2004, Oreilly and Associates.</copyright>

               <managingEditor>editor@oreilly.com</managingEditor> 
               <webMaster>webmaster@oreilly.com</webMaster> 
               <pubDate>03 Apr 04 1500 GMT</pubDate>
               <lastBuildDate>03 Apr 04 1500 GMT</lastBuildDate>
               <docs>http://backend.userland.com/rss091</docs>
               <skipDays>
               <day>Monday</day>
               </skipDays>
               <skipHours>
               <hour>20</hour>
               </skipHours>
               <cloud domain="http://www.oreilly.com" port="80" path=
"/RPC2" 
registerProcedure="pleaseNotify" protocol="XML-RPC" />

  <image>
    <title>RSS0.91 Example</title> 
    <url>http://www.oreilly.com/example/images/logo.gif</url> 
    <link>http://www.oreilly.com/example/index.html</link>
    <width>88</width> 
    <height>31</height> 
    <description>The World's Leading Technical Publisher</description>
  </image>
  <textInput>
    <title>Search</title>
    <description>Search the Archives</description>
    <name>query</name>
    <link>http://www.oreilly.com/example/search.cgi</link>
  </textInput>
   
  <item>
    <title>The First Item</title> 
    <link>http://www.oreilly.com/example/001.html</link> 
    <description>This is the first item.</description>
    <source url="http://www.anothersite.com/index.xml">Another Site</source>

    <enclosure url="http://www.oreilly.com/001.mp3" length="54321" type"audio/mpeg"/>
<category domain="http://www.dmoz.org">
               Business/Industries/Publishing/Publishers/Nonfiction/</category>

  </item>
   
  <item>
    <title>The Second Item</title> 
    <link>http://www.oreilly.com/example/002.html</link> 
    <description>This is the second item.</description>
    <source url="http://www.anothersite.com/index.xml">Another 
;Site</source>
    <enclosure url="http://www.oreilly.com/002.mp3" length="54321"
type"audio/mpeg"/>
    <category domain="http://www.dmoz.org">
               Business/Industries/Publishing/Publishers/Nonfiction/</category>

  </item>
</channel>
</rss>

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint