Wednesday 30 May 2012

XML Parser to Parse Twitter Responses

Twitter offers wide range response formats viz. XML, json, rss and atom to choose from. However, twitcurl, the library that spectrum-twitter backend uses to interact with Twitter, uses XML. Hence, it was necessary to have an XML parser to  parse twitter response data and send this parsed data back to the user. Luckily, Swiften, one of the libraries used by spectrum, already had the necessary code to write XML parsers. I finally (with a bit of help from my mentor;)) finished writing a basic XML parser that can parse status messages returned by twitter in XML. The user can now view his timeline:)

No comments:

Post a Comment