[XML4Lib] What Java XML library do you recommend (to replace dom4j)?

Josef Tupag joseftupag at gmail.com
Tue Jun 22 14:25:25 EDT 2010

I'm looking for something like dom4j, but without dom4j's warts, such as bad
or missing documentation and seemingly stalled development status.

Background: I've been using
but don't feel completely right about it because I know the library
is far from optimal (example: see how methods in XSLT related
are documented; what would you pass to run() as the String
mode parameter?)

Requirements: The library should make basic XML handling easier than it is
when using<http://stackoverflow.com/questions/729621/convert-string-xml-fragment-to-document-node-in-java/729668#729668>
Things like this:

   - Read an XML document (from file or String) into an object, easily
   traverse and manipulate the DOM, do XPath queries and run XSLT against it.
   - Build an XML document in your Java code, add elements and attributes
   and data, and finally write the document into a file or String.

I really like what dom4j promises <http://www.dom4j.org/>, actually: "*easy
to use, open source library for working with XML, XPath and XSLT [...] with
full support for DOM, SAX and JAXP.*" And upcoming dom4j 2.0 does claim to
fix everything: fully utilise Java 5 and add missing documentation. But
unfortunately, if you look closer <http://www.dom4j.org/download.html>:

Warning: dom4j 2.0 is in pre-alpha stage. It is likely it can't be compiled.
In case it can be compiled at random it is likely it can't run. In case it
runs occasionally it can explode suddenly. If you want to use dom4j, you
want version 1.6.1. Really.

...and the website has said that for a *long* time. So is there a good
alternative to dom4j? Please provide some justification for your preferred
library, instead of just dumping names and links. :-)

Josef Tupag humidifiers <http://thebesthumidifiers.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webjunction.org/wjlists/xml4lib/attachments/20100622/b6cd45f7/attachment.htm>

More information about the XML4Lib mailing list