Weblog entry #158 for Steve

Validating RSS feeds?
Posted by Steve on Sun 18 Feb 2007 at 19:39
Tags: none.

Due to some bad editing in the past some of our RSS feeds (specifically "recent comments", "comments on article", "comments on poll" and "comments on weblog") were broken.

Now I've updated them so they validate correctly.

If there were a simple RSS validating tool I could use from the command line I'd appreciate pointers to it... That way I could add a couple of tests to the site test suite to make sure I didn't break things in the future.

 

Comments on this Entry

Posted by Anonymous (81.187.xx.xx) on Sun 18 Feb 2007 at 23:09
I'd use xmllint to make sure you have valid xml. If you want to check the rss itself, I'd use feedparser and write a short bit of python and check the bozo bit.

JD

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Mon 19 Feb 2007 at 00:01
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Cheers.

I've added a simple test case to validate the XML, and will look at using feedparser shortly.

Steve

[ Parent | Reply to this comment ]

Posted by rodaballo (213.73.xx.xx) on Mon 19 Feb 2007 at 22:03
[ Send Message ]
There's one, Feed Validator.

You can use it online at http://feedvalidator.org or install it in your server:

http://feedvalidator.org/docs/howto/install_and_run.html

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Mon 19 Feb 2007 at 23:58
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Oooh that looks perfect, thanks very much!

I use their online service a lot and there are links to some of the results on this site, but I didn't realise they had a downloadable tool too.

After examining this a little it looks like I can use it - I've committed a stub validator test, and I've fixed a couple of minor bugs already.

The thing that always trips me up with feeds is the strictness of date & time formatting. Right now that breaks a few feeds - but I will get them all to pass by tomorrow.

Steve

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search