dom4j

dom4j [http://www.dom4j.org/] began as a fork of the JDOM project by one developer, James Strachan, who disagreed with several aspects of the JDOM architecture, including the decision to use classes instead of interfaces. dom4j has since gone its own way to feature a very different approach to a pure-Java, tree-based API than either DOM or JDOM. Notable unique features in dom4j include integrated XPath and XSLT support and optional DOM compatibility (for example, you can wrap a dom4j Element inside a DOM Element).

Example 5.8 shows the dom4j version of our standard example. It's structured pretty much like the previous two tree-based APIs. First a Document object representing the XML-RPC request is constructed in memory, and then it is ...

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.