Choosing the right IOS XML parser [closed] Choosing the right IOS XML parser [closed] ios ios

Choosing the right IOS XML parser [closed]


Best comparison I've seen on the subject:

http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

The difference between the slowest and fastest parsers in his case was a factor of 2. Depending on your feature requirements, there are definitely parsers that can cut your parsing time in half.


Check out RaptureXML. It's not official XPath behavior, but it's pretty close. Your query would be:

[rxml iterate:@"comments.comment" with: ^(RXMLElement *e) {    if ([[e child:@"author"].text isEqualToString:@"foo1"]) {        NSLog(@"Blog Text is %@.", e.text);    } else {        NSLog(@"Comment Text is %@.", e.text);    }}];

UPDATE: RaptureXML now supports XPath!


You should look at these libraries, in order :)

  1. Ono, powered by libxml2
  2. XMLDictionary
  3. RaptureXML

Ono has the the cool AFOnoResponseSerializer which can be integrated with AFNetworking