[](https://travis-ci.org/Francis Chong/IGXMLReader)
The IGXMLReader
allows you to effectively pull parse an XML document. Once instantiated, call #nextObject to iterate over each node. Note that you may only iterate over the document once!
IGXMLReader
parses an XML document similar to the way a cursor would move. The Reader is given an XML document, and return a node (an IGXMLReader object) to each calls to nextObject
.
IGXMLReader* reader = [[IGXMLReader alloc] initWithXMLString:@"<x xmlns:edi='http://ecommerce.example.org/schema'>\
<edi:foo>hello</edi:foo>\
</x>"];
for (IGXMLReader* node in reader) {
NSLog(@"node name: %@", node.name);
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
IGXMLReader is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "IGXMLReader"
Francis Chong, francis@ignition.hk
IGXMLReader is available under the MIT license. See the LICENSE file for more info.