Summary

JDOM is a pure Java API for processing XML documents. It is more complete than either SAX (which doesn't offer any standard way to write new XML documents) or DOM (which can manipulate XML documents but doesn't know how to parse or serialize them). It is also much easier to use than either SAX or DOM for most tasks. It has the convenience of a pull-based tree API with DOM and the familiarity of following standard Java conventions with SAX. However, JDOM is not SAX and it is not DOM. JDOM can transfer data to and from SAX and DOM, but it is its own API, complete unto itself.

JDOM uses concrete classes rather than interfaces. This means that you can create instances of most of the node types just by passing an argument or two to a constructor. ...

Get Processing XML with Java™: A Guide to SAX, DOM, JDOM, JAXP, and TrAX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.