Tatsuhiko Miyagawa's Blog

Bloglines sync API and RSS 2.0

January 11, 2005

Bloglines Sync API gives you an access to fetch all unread items in a single API call of http://rpc.bloglines.com/getitems?s=0 (s=0 means it fetches from all feeds). The response is in RSS 2.0 with multiple channels. Umm, multiple channels!

Link: RSS 2.0 Specification.

Subordinate to the element is a single element, which contains information about the channel (metadata) and its contents.

RSS 2.0 spec says RSS has “a single element”. Thus XML::RSS cannot handle this form of rss and WebService::Bloglines neither (it uses XML::RSS under the table).

What’ll be the best solution for it? Should I switched to other generic XML parser like LibXML to parse the response (invalid) rss 2.0 in Bloglines module?

Now I’ve modified WebService::Bloglines, first to filter Bloglines response XML using XML::XPath and split into valid (single in ) RSS 2.0, then pass it to XML::RSS. Available as version 0.03 and going to CPAN.