Stay Current on Formats


Can you tell what's wrong with this RSS document?

    <?xml version="1.0"?>    <!DOCTYPE rss SYSTEM      "http://my.netscape.com/publish/formats/rss-0.91.dtd">    <rss version="0.91">      <channel>        <copyright>Copyright 2005.</copyright>        <pubDate>Wed, 14 Dec 2005 07:00:00 GMT</pubDate>        <lastBuildDate>Mon, 12 Dec 2005 07:00:00 GMT</lastBuildDate>        <docs>http://www.rssmaniac.com/steve/info.html</docs>        <description>This feed contains news from Steve!</description>        <link>http://www.rssmaniac.com/steve</link>        <title>Steve's News!</title>        <language>en-us</language>        <image>          <title>Steve's News</title>          <url>http://www.rssmaniac.com/steve/Image.jpg</url>          <link>http://www.rssmaniac.com/steve</link>          <description>Steve's News</description>          <width>144</width>          <height>36</height>        </image>        <managingEditor>steve@rssmaniac.com (Steve)</managingEditor>        <webMaster>steve@rssmaniac.com (Steve)</webMaster>        <skipHours>          <hour>8</hour>          <hour>9</hour>          <hour>10</hour>        </skipHours>        <skipDays>          <day>Sunday</day>        </skipDays>        <item>          <title>Steve shovels the snow</title>          <description>It snowed once again.            Time to shovel!>          </description>          <link>http://www.rssmaniac.com/steve</link>          <enclosure url="http://www.rssmaniac.com/steve/shoveling.mp3"            length="4823902" type="audio/mpeg" />        </item>        <textinput>          <title>Search for other items</title>          <description>What do you want to find?</description>          <name>search</name>          <link>http://www.rssmaniac.com/find.php</link>        </textinput>      </channel>    </rss> 


The answer is that it's an RSS 0.91 document that contains an <enclosure> element, and RSS 0.91 doesn't support enclosures. This document won't validate.

The way to avoid problems like this is to know what your version of RSS or Atom can or can't doand again, validate your feeds before publishing them. Another way is to use the most recent version, such as RSS 2.0, so that you don't end up using elements the language doesn't support.



Secrets of RSS
Secrets of RSS
ISBN: 0321426223
EAN: 2147483647
Year: 2004
Pages: 110

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net