Iconara DOM framework

Iconara DOM framework

A Cocoa framework for manipulating XML-data via the Document Object Model.

Update The code is now available at Google Code: http://code.google.com/p/iconaradom. The contents of this page should be moving there soonish.


Mac OS X 10.2 or newer, may work with earlier versions, but that is not tested. Mac OS X 10.3 is recommended (that's the system I'm developing on).

Notice to iPhone developers

I haven't personally tested the framework on the iPhone, but I know of people who at least have tried it out. It may or may not work. It shouldn't be too hard to make work and I'm sure it would be easier to work with than using libxml2 directly.

Notice to users of Mac OS X 10.4 (Tiger)

The framework builds and runs on Tiger, in fact, the current version should have no problem running on Tiger, Panther or earlier systems. There seems to be an issue with the optional NSXML builder, but I'm not certain it's critical, if you need it, you should try for yourself.

In Tiger, Apple has included a tree based API in NSXML, and for most purposes it seems to fill the role of this framework as good, or better. I recommend that if use NSXML before Iconara DOM if you develop for only Tiger. You will have one dependency less, and better reliability than I can ever offer. For most of you, Tiger-only is not an option, and for you Iconara DOM remains, and will continue to be developed.

Read me

What is DOM?

DOM stands for Document Object Model and can be thought as a way of describing an XML-document in terms of a tree of objects. A document has nodes, which in turn contains other nodes, all represented by objects. For those of you who have programmed JavaScript, the document-object is a kind of DOM, representing all (well, almost), tags and other things on the web-page, in Mozilla and Safari this is actually true. DOM is a recommendation from W3C (www.w3c.org/DOM).

What is Iconara DOM?

Iconara DOM is a W3C DOM compliant framework for manipulating XML-data. It defines the core module, plus a basic implementation of the XPath module.
I have followed the JDOM and XOM philosophy of integrating DOM into the language, more than being 100% compliant. In my humble opinion, the W3C DOM-interfaces are ugly as hell. Especially if you apply them to Objective-C. Iconara DOM can do more or less everything that a DOM compliant framework can do, in a nice Objective-C way, not in the ugly IDL way.
The framework is licenced under the GNU GPL, but I'm willing to release specially licenced versions that can be used in non-GPLed applications. If you are interested in such an arrangement, please contact me, and we'll work something out. As of v2.0 there is a special exception for Free and Open Source software which allows for linking the framework with non-GPL'ed code, as long as that code is licensed under a OSI- approved license (see the documentation for more info).

Why Iconara DOM?

The Document Object Model (the DOM, that is) is a nice interface to work with. It represents XML in a intuitive way, at least if you see XML as a tree-like structure with nodes of different types containing different kinds of data.
There has not been, to my knowledge, any DOM framework for Cocoa, before NSXML in Tiger, but even that is not actually DOM compliant. For Java developers there are lots of frameworks available. For us Not so for us Cocoa developers. I wanted to fill a hole in Cocoa.


The framework is build to be embedded into applications, add it to your project and make sure that it is copied to the frameworks-directory inside the application bundle when the project is built. If you would like a framework that is built to be installed as a standalone framework, you can download the source and build it with the build style ”Deployment (standalone)”.
Iconara DOM Framework is written in Objective-C, for those developing Cocoa-applications in Java I suggest using JDOM or XOM which are much better alternatives, but not available to Objective-C-programmers. This framework will do for the basic needs, and perhaps some more demanding and complex tasks as well. Mail your success stories to me!


The framework is currently at v2.0 (released 15 March 2005).

These are some extras that you can download and use with the framework. Currently there is an experimental builder based on the libxml2 library, and a stable builder based on Apple's NSXML (may be shaky on Tiger, because of the updates to NSXML).


Known bugs & shortcomings


Release notes

2005-03-15 (v2.0)

Major rewrite, new XPath support and lots of bug-fixes. The framework is now tested to a much larger extent than before, much thanks to the TestRunner framework, which I developed to be able to do unit testing properly (the existing frameworks are too bloated for my taste/needs).

2003-07-28 (v1.1.5)

Bugfixes for v1.1, plus some more DOM-compliance

2003-07-23 (v1.1)

Added XPath filters, a really cool feature that I have been planning on including for almost a year. Parts of the framework has now been properly tested, both for functionality and for memory leaks. Also worked a lot on DOM-compliance, some methods have been renamed or removed due to this, but the changes are not that big, just recompile with the new version and fix all warnings.

2003-05-16 (v1.0.1)

Bugfixes to 1.0, and a small new feature

2003-04-27 (v1.0)

Fixed the parser, which means that the framework feels complete enough for version 1.0!

2002-12-15 (v0.9)

Created ix editor to test the framework more thoroughly

2002-12-25 (v0.8.1)

Bugfixes to 0.8

2002-12-15 (v0.8)

First public release! Ignore version 0.7, it was a mistake. Complex and ugly. But DOM Level 2 Core compliant... This version build directly on 0.6, skipping 0.7.

2002-08-29 (v0.7)

The other day I thought to myself: "this framework is soon ready for release". Then I realised that the W3C has recommendations for the DOM... so now the framework is completely rewritten for DOM Level 2 Core compliance. This is implemented through categories on all the classes that define the methods and getters/setters required. Don't think it was easy. I threw away all my old code.

2002-08-19 (v0.6)

2002-08-14 (v0.5)

2002-05-24 (v0.4)

2002-05-19 (v0.3)

2002-05-05 (v0.2)

2002-04-27 (v0.1)