Swimming with the Razorfishes

Sunday, December 21, 2003

I'm looking through alternatives for parsing XML using Objective C. Why Objective C? It is the preferred language for native MacOS X software, and it is a funky, mind-expanding language for someone who spends most of his time writing in Java. Here is what I've found so far:

From Apple:

  • NSXMLParser: From Apple's Foundation classes, NSXMLParser provides a SAX interface. I just found out about this class because it was only added in 10.3
  • Core Foundation XML: Apples Core Foundation XML classes are C-based (not Objective C), so probably don't belong here. Still, if you have simple DOM-based XML needs, it may be sufficient.


From Third Parties:

  • ExpatObjC: An objective C wrapper for the C-based Expat library. ExpatObjC provides a SAX interface.
  • XMLTree: An Objective C interface to Apples XML parsing library. Provides a DOM interface.
  • SKYRiX XML: A interesting library, formerly maintained by the SKYRiX corporation, now maintained by the OpenGroupware project. It provides both SAX and DOM parsing interfaces, as well as a pluggable driver module that can use CFXML, expat, and libical. SKYRiX XML also implements a SOAP library (minus the transport).
  • Iconara DOM: A Cocoa framework providing a DOM interface for XML parsing. I couldn't tell what underlying library was actually doing the parsing.


None of these is so compelling that I'd use it above the others. I'm curious to play with Apple's NSXMLParser to see what it can do. I've started using the XMLTree class, but I'd prefer to use something provided by Apple for something so fundamental as XML parsing.

Interesting stuff. I'd certainly be interested to hear what other people are doing.

0 Comments:

Post a Comment

<< Home