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

Validate RSS and Atom Documents

Use an online validator to check your RSS and Atom documents.

You can check RSS 0.91, RSS 1.0, RSS 2.0, and Atom documents online using Mark Pilgrim and Sam Ruby’s Feed Validator (http://feedvalidator.org). The project is hosted on SourceForge (http://sourceforge.net/projects/feedvalidator/). This hack will use Feed Validator to check an RSS or Atom document.

Go to http://feeds.archive.org/validator/ and in the text box, enter the URL http://www.wyeast.net/news.rss (0.91) as shown in Figure 6-4, or an Atom document, http://www.wyeast.net/atom.xml. (The scheme name http:// is already provided in the text box.) Click the Validate button. The file is processed and the results are posted to the browser (Figure 6-5).

Feed Validator in Firefox

Figure 6-4. Feed Validator in Firefox

Results of validating an RSS document with Feed Validator

Figure 6-5. Results of validating an RSS document with Feed Validator

If the validator generates errors, you can read more about these errors at http://feedvalidator.org/docs/. For example, if your RSS document is not well-formed, it will generate an XML parsing error, which you can read about at http://feedvalidator.org/docs/error/SAXError.html.

W3C RDF validator

Figure 6-6. W3C RDF validator

If you want to parse an RSS 1.0 feed, ...

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