[jdom-interest] RE: dom4j similar to JDOM ?

Jason Hunter jhunter at acm.org
Tue May 15 17:23:56 PDT 2001

Tobias Rademacher wrote:
> Have a look at
> http://www.dom4j.org/compare.html

Not mentioned in the comparison:

* JDOM is a JSR with the official support of the JCP
* JDOM has an active user community
  (compare http://lists.denveronline.net/lists/jdom-interest/
   to http://www.geocrawler.com/archives/3/8798/2001/)
* JDOM has had tens of thousands of downloads over the past year
* JDOM has been written about in several books and many articles

Some of the items listed in the dom4j comparison also have a touch of
"spin" to them where perhaps the full story should be told.  Here's a
little bit of background.

For the "Integrated XPath support" item:  dom4j claims to have this
while it claims JDOM does not.  The reality of the situation is that
dom4j ported the code.werken.com library (written for JDOM) and
integrated it into the dom4j library.  JDOM could actually "integrate"
the XPath library today, but we haven't because the XPath implementation
isn't complete and probably won't be complete for some time.  We don't
want to hold up the 1.0 release waiting for XPath.  If anyone thinks its
worth integrating XPath as is, we could talk about it.  In the
meanwhile, it's an easy-to-get add-on.

For the "Support for JAXP/TRaX for XSLT integration" item.  I'm not sure
why the chart says No with JDOM considering JDOMSource and JDOMResult
are in jdom-contrib.  The reason those classes are not into the core yet
is we're working with Sun to decide if JDOMSource and JDOMResult are
better provided by JDOM or by JAXP itself (since SAXSource/SAXResult are
provided by JAXP and not by SAX).  I suspect with the next JAXP still a
way off, we should just incorporate them into JDOM directly.

For the "Capable of processing massive documents" item.  I see the
benchmarks Dennis published recently show dom4j using more memory than
JDOM.  Now, neither JDOM nor dom4j have been tuned at all yet, but I'd
be curious what dom4j code backs up that claim.

I'm not sure what the "Continuous XML Streams" bullet is about. 
Considering JDOM has pluggable builders such that you can build from
even a database result set, I'm sure it wouldn't be hard to build from
any sort of stream.


More information about the jdom-interest mailing list