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

Sure, XOM 🙂

XOM is designed to be easy to learn
and easy to use. It works very
straight-forwardly, and has a very
shallow learning curve. Assuming
you’re already familiar with XML, you
should be able to get up and running
with XOM very quickly.

I use XOM for several years now, and I still like it very much. Easy to use, plenty of documentation and articles on the web, API doesn’t change between releases. 1.2 was released recently.

XOM is the only XML API that makes no
compromises on correctness. XOM only
accepts namespace well-formed XML
documents, and only allows you to
create namespace well-formed XML
documents. (In fact, it’s a little
stricter than that: it actually
guarantees that all documents are
round-trippable and have well-defined
XML infosets.) XOM manages your XML so
you don’t have to. With XOM, you can
focus on the unique value of your
application, and trust XOM to get the
XML right.

Check out web page http://www.xom.nu/ for FAQ, Cookbook, design rationale, etc. If only everything was designed with so much love 🙂

Author also wrote about What’s Wrong with XML APIs (and how to fix them). (Basically, reasons why XOM exists in the first place)

Here is also 5-part Artima interview with author about XOM, where they talk about what’s wrong with XML APIs, The Good, the Bad, and the DOM, A Design Review of JDOM, Lessons Learned from JDOM and finally Design Principles and XOM.

Leave a Comment