I have a large XML file ( around 1mb ) . i want to ask that if i parse the XML with NSXMLParser or KissXML/TouchXML.
which will take less interim memroy ?? ( the memroy took during parsing ) .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Considering for a large XML document you’re likely not going to want a DOM parser, that rules out KissXML and TouchXML. Look for a SAX parser instead.
Using libxml2 in SAX mode is slightly (very marginally) more memory efficient than NSXMLParser, but the latter has a friendlier API, so the minimal memory savings may not be worth it (I wouldn’t consider it worth it to jump straight to raw libxml2).
If you are dead set on using a DOM parser, you’re not going to be able to find anything to process your document anywhere near as memory efficient as a SAX parser. For that reason, I won’t recommend any DOM parser.