XOM: New tree-based XML API
01:46, 21 Sep 2002 UTC | Michael Smith

Elliotte Rusty Harold has announced a new tree-based XML API, XOM (from the generic term XML object model), which he describes as "closest in spirit to JDOM" and representing an "effort to synthesize the best features of the existing APIs while eliminating the worst".

Javadoc for his open source (LGPL) Java implementation of the API is available at the XOM web site, along with the beginnings of a tutorial and a jar file and source distribution. It requires a SAX2-compliant parser. Specifically, it seems to require Xerces-J 2.1.0 or greater -- it won't work with Xerces 2.0.x, Crimson, GNU JAXP 1.0b1, or Piccolo 1.0.2 because of deficiencies in those parsers.

In a slide from a related What's Wrong with XML APIs (and how to fix them) presentation, Harold lists some high-level design principles that guided him in development of XOM:

  • Principle of Least Surprise

  • As simple as it can be and no simpler!

  • Use Java idioms where they fit

  • There's exactly one way to do it

  • Start small and grow as necessary

He says that he took a "Less is more" ("easy to learn, easy to use, fast enough, and small enough") approach to XOM, that, for example, "deliberately eschews the many convenience methods that make the JDOM API so cluttered". He details some of the other differences between XOM and JDOM in another slide from the presentation and in the first section of his XOM FAQ (which includes a list of XOM features that have no equivalent in JDOM).

Harold has set up an open xom-interest mailing list for both user and developer discussion about XOM. Judging from the list archives, there's already a lot of activity on the list.

Related stories

Elliotte Rusty Harold on the Future of XML

| See 1 comment

Newest comments

Re: XOM: New tree-based XML API (Chris Lovett - 20:13, 11 Oct 2002)
Your design goals are the same that drove the design of the System.Xml object model in the Microsoft ...
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories