Friday, May 31, 2013

iOS Universal XML Parser


Universal XML Parser Static library download here:

XML Parsing and JSON Parsing are quite common tasks to be handled in mobile application development while playing with asynchronous web services and data.

Coming to iPhone app development, JSON  parsing is just a one line code using NSJSONSerialization, which is implemented by apple itself in Foundation framework, which is available in iOS 5.0 and later.
 (Ref: http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html)

However We've been thinking for a while, why cant they implement similar thing for XML Parsing as well.

Even though there are some handful XML parsers available, we feel these parsers are not as generic and as flexible as default JSON parser provided by apple.

Because almost all these parsers works on the principle of parsing XML data based on the tags provided as inputs, which in turn means we need to input the tags that are going to be nested in the XML data to be parsed. Means any change in the tag names or the order of nesting, Parser fails.

Thus we thought of implementing an Universal XML Parser, which irrespective of tags should parse the data like that is being done using NSJSONSerialization, and therefore is this static library implemented.

Use this static library XMLParser_lazyWorkaholics where ever XML Parsing is required which gives output in the form of array of dictionaries.


Suggestions for improvement are warmly welcomed.
Thank you.

No comments:

Post a Comment