Re: XML parser for objective C
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com User-agent: Microsoft-Entourage/10.1.4.030702.0
Message: 12 Date: Fri, 30 Sep 2005 05:35:05 -0700 From: Greg Herlihy <greghe@pacbell.net> Subject: Re: XML parser for objective C To: David Chan <phoenix.chix@gmail.com>, <cocoa-dev@lists.apple.com> Message-ID: <BF627F09.681%greghe@pacbell.net> Content-Type: text/plain; charset="US-ASCII"
I would recommend the open-source libxml2 which Apple first included with Panther. For Tiger Apple added libxslt and libexslt. The command line tools xmllint and xsltproc are built from these libraries.
libxml2 has a very straightforward C interface and is quite easy to use, both for SAX or for DOM construction. libxml2 expects documents to be UTF-8 encoded, so documents in other character sets would have to be converted first.
I agree with this. I tried several approaches to parsing XML on OS X, from both Cocoa and Applescript Studio apps, and have had the best results from using libxml. It's fairly easy to walk and XML tree and retrieve the info you want with libxml, it's well documented online, and it's very portable. Craig -- Dr. Craig A. Hunter NASA Langley Research Center AAAC / Configuration Aerodynamics Branch (757) 864-3020 craig.hunter@nasa.gov _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Craig Hunter