What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Parsing XML issue... advices needed.

Kandjar

iPF Noob
Joined
Oct 4, 2010
Messages
14
Reaction score
0
Hi,

I'm working on an app, which parses some XML files to build up an database.

Originally, I was presenting a popup to the user telling him that the db needed to be built. Once he clicked YES; the XML files would get loaded, and the database constructed...

I originally used: NSXMLParser; sadly, the XML files I'm using aren't perfect and NSXMLParser bailed out before completing the parsing... stupidly without having an "ignore this error" option... I switched to TBXML.

Everything worked, except that it takes about 5 minutes to download and parse all XML files (about 200).
I refactored it to download the XML in the background; and once the file is downloaded into NSData objects; I initialize the TBXML and do the parsing...

Now I'm facing two issues:
1 - everytime a download is achieved the app will freeze for couple of seconds.
2 - if the freeze time is too long, the app will just automatically quit (thinking it's crashed...)

Beside creating another thread to do the XML parsing/database populating...
Does anyone has any advices? Such as: better XML library to use, or a way to divide the work using event or notification...?
 

Most reactions

Latest posts

Back
Top