This post originated from an RSS feed registered with Python Buzz
by Phillip Pearson.
Original Post: Post-parsing thoughts
Feed Title: Second p0st
Feed URL: http://www.myelin.co.nz/post/rss.xml
Feed Description: Tech notes and web hackery from the guy that brought you bzero, Python Community Server, the Blogging Ecosystem and the Internet Topic Exchange
OK, now I've shown how to parse RSS-Data and how to parse namespaced RSS extensions in Python. I'm still not convinced that it's a good idea. Parsing the RSS-Data was just barely easier than parsing the straight XML, but only because xmlrpclib's return codes are more familiar to me than elementtree's tree objects. I would argue that the time spent on hooking the XML-RPC and RSS parser in your language of choice together would be better spent on writing an XML library like elementtree.
Roger Benningfield claims that the RSS-Data one is more useful by default than the straight XML one, but I'd argue with this. For example, here are two bits of XML, which I assert are equally useful without any specific support from an aggregator:
This parses into an elementtree which is equivalent to {'foo': 'bar'>, and we still know that instructions for understanding this information are at http://www.myelin.co.nz/ns/x.
---
Georg Bauer suggests a sensible application for RSS-Data: using the RSS feed to push generic data (that the RSS feed generator doesn't understand) back to a periodically-connected client (like Radio, or Georg's PyDS) to process.
This sounds very sensible -- in this case, you can't use a well-specified XML encoding, because the RSS writer doesn't have a clue what it's writing.
When you are talking about well-specified data -- say, recipes, reviews, events, or music -- however, there's no necessity to use a general encoding like this.