Chapter 14. JDOM

Tree-based APIs such as DOM are very useful when developers want to keep the entire document in memory at once with random access to the entire tree. Unfortunately, DOM suffers from a number of design flaws and limitations that make it less than ideal as a Java API for processing XML. These include the following:

  • DOM needed to be backward compatible with the hackish, poorly thought out, unplanned object models used in third-generation web browsers.

  • DOM was designed by a committee trying to reconcile differences among the object models implemented by Netscape, Microsoft, and other vendors. The DOM committee needed a solution that was at least minimally acceptable to everybody, which resulted in an API that's maximally acceptable ...

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.