ARC Compliant GDataXML Library

Recently I had to write a simple app that read XML file located on the server and populate my model with information. As you probably know, on iOS parsing can be done using two kinds of parsers, a DOM parser or a SAX parser. A SAX parser is a sequential parser and returns data on a callback using a delegate. SAX parser works by giving you data as it becomes available (after downloading everything).

The advantage of using a DOM parser is its capability to access at random using XPath queries. There is also no delegation like in SAX model. It makes the code cleaner and easier to read. DOM parser is slower than SAX, but only if the size of the document is larger than 1 megabyte.

While you can use iOS SDK library for parsing XML, there are 3rd party libraries that make XML parsing easier. One of those libraries is GDataXML.

Unfortunately it is not ARC ready. But since I decided to use it anyway (it performs well for DOM parsers, supports both reading and writing, and is so easy to integrate), I wanted to refactor it to support ARC.

You can find ARC compliant GDataXML library here.

ARC Compliant GDataXML Library