Parsing XML in chunks using NSXMLParser

herlindaogromo

New Member
I'd like to use \[code\]NSXMLParser\[/code\] to parse a large xml file. There are a few thousand elements on the root level, so it's too large for a tree based approach. Ideally, I would like to parse each of those one thousand elements individually into a tree and then do some (more complicated) parsing on them. I only need the string values (including the xml markup) of these root level elements which I can then hand off to my already existing tree based parser. I wasn't able to find out how to do that with \[code\]NSXMLParser\[/code\], if possible at all. Imagine an xml file like this\[code\]<start> <record> <title>The Title</title> <content>Some content</content> </record> <record> <title>The Title</title> <content>Some content</content> </record></start>\[/code\]For each \[code\]record\[/code\], I'd like to get a string containing \[code\]<title>The Title</title> <content>Some content</content>\[/code\].
 
Back
Top