开发者

Iphone XML file parsing preference, but what is Big what is Small?

开发者 https://www.devze.com 2023-03-14 15:11 出处:网络
You may know here is a page comparing the XML parsers for Iphone, http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

You may know here is a page comparing the XML parsers for Iphone,

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

The comparing words for these parsers are ; "this one is for small XML files" "for large XML files" "for relatively small XML files"

Well what the heck on earth does that mean? for instance speed is important for me and my XML is expected to be around 300KB so is that small? big or relatively small? and what does large XML files mean in Iphone? 1 MB? 50 MB? 100MB? or even 500KB?

I know there is not a strict distinction exis开发者_运维百科t, but at least I need to have a rough idea what those adjectives means, I need to parse this XML in around 1-2 seconds in IPhone.

how should I choose to use one parser over another by looking at my file size and my speed requirements?

Thanks


We have an app that downloads a configuration file from a server that is frequently in excess of 1 MB. We use GDataXml to parse it, and it's relatively fast. 1MB of XML is kind of large for an XML file, but then again I'm sure large companies like WalMart, Tyson, etc. have apps that use massive XML files (possibly 50 MB). That really is a massive amount of text data though, and JSON may be a better alternative in terms of character use. Additionally, you can read the data straight from the file and shove it in an NSDictionary that you can then query. If you have control of the file output, consider JSON.

0

精彩评论

暂无评论...
验证码 换一张
取 消