Spring
Spring

Reputation: 11835

Iphone big XML files parsing efficiency

I plan to develop an Iphone application which will communicate with my SOAP web service, it is a stateless web service which will each time send back and forth whole the state in the XML(a few hundreds of questions and their answers, types..etc. expected to be a 200-300kb of XML file I guess)

I plan to use WSDL2ObjC. Every time the user click next, it will send current XML, receive new XML and parse whole XML and print the latest question on the screen.

I do not know if it is something easily IPhone can handle to receive and parse whole 200-300KB size XML easily in every next click.

My questions is; in terms of memory and CPU can I have any problems? and which points should I be careful, which parsers should I use..etc

tnx

Upvotes: 3

Views: 1341

Answers (1)

AliSoftware
AliSoftware

Reputation: 32681

Obviously for big files, you do need to use a SAX parser and not DOM.

iOS SDK contains an Objective-C class (NSXMLParser) you can usually use to do SAX parsing.

But if you are concerned about performance, memory usage and CPU, you may compare it with other solutions like the libxml2 C library or other. See this article that compares existing XML parsing libraries available for iOS and their performance. It should answer your question.

Upvotes: 2

Related Questions