◆ 무한한 가능성/& MAC - iOS

[iPhone] How To Choose The Best XML Parser for Your iPhone Project

치로로 2010. 8. 4. 09:34

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


Finally, let’s wrap up with a chart that summarizes the differences between the parsers and everything we’ve discussed above:

NSXML libxml2 – SAX TBXML TouchXML KissXML TinyXML GDataXML libxml2 – DOM
Included with SDK? Yes Yes No No No No No Yes
Seconds to Parse 1.87 1.19 0.68 1.1 1.37 1.27 1.07 0.84
Peak Memory Usage 3.11 3.01 3.07 6.5 5.25 4.8 4.15 4.97
Parse While Downloading? No Yes No No No No No No
Edit/Save XML? No No No No Yes Yes Yes Yes
XPath Support? No No No Yes Yes Yes* Yes Yes
C or Obj-C Obj-C C Obj-C Obj-C Obj-C C Obj-C C
License Apple MIT MIT MIT MIT ZLib Apache MIT

* = with TinyXPath





ref>
http://cafe.naver.com/mcbugi/10546

About answer of XML Parser

NSXMLParser, LibXML2 두 가지를 기본 지원합니다.
NSXMLParser는 Objective-C 의 delegate 구조로 되어 있고, SAX입니다.
LibXML2는 C로 되어 있고, DOM, SAX 지원합니다.
Parsing interface, 개발 편의성, 성능 지표등을 비교해보고 골라 쓰면 되겠습니다.

Sample code>
https://developer.apple.com/iphone/library/samplecode/XMLPerformance/