There's a bit of a battle going on whether the elements in RSS 2.0 should be in a namespace or not. (See, for example, Dave's comment.)
Regardless of your position on this issue, if your RSS aggregator (more correctly, its RSS/XML parser) is namespace-aware, there's a very simple scheme that you can use in the meantime until this matter settles: Grab the <rss> element (that's easy to do, as it's the document element). Ask your XML parser for the namespace of that element. If it's in no namespace, continue as for RSS 0.9x. If it's in a namespace, all the other RSS 2.0 elements (<title>, <link>, <description>, <item>, etc.) will also be in that namespace.
We've been using this algorithm in Aggie for the last few days. It's easy to implement, and until the matter resolves one way or another, it successfully reads all the RSS 2.0 feeds out there.
|