The XMLBench program was developed to test several aspects of performance for XML document models in Java. The version of the program described here includes test implementations for Crimson DOM, Xerces and Xerces2 DOM (using both the default deferred node construction and immediate construction), JDOM, dom4j, Electric XML , and XML Pull Parser XPP2

The versions tested were those currently in a "released" form as of early February, 2002:

  • Crimson v1.1.3
  • Xerces v1.4.4
  • Xerces2 v1.0
  • JDOM b7
  • dom4j v1.1
  • Electric XML v3.2
  • XML Pull Parser XPP2 2.1.7

The test results measure both execution speed and memory usage for a range of XML documents. Performance for small XML documents (in the range of several hundred to several thousand characters) is measured using collections of similar documents processed as a unit. Larger documents (in the 100-200 thousand character range) are processed individually, as is a single very large (2.9 million character) document. See the test methodology page for full details on the test procedure.

Results from an earlier version of this test framework were published by IBM developerWorks XML Zone in October, 2001 as XML in Java : Document models, Part 1: Performance, and much of the included text is based on that article. The second article in this series was published in February, 2002 (after a lengthly review cycle) as XML in Java : Document models, Part 2: Usage. The next articles in the developerWorks series will look at Java data binding as an alternative to the document models, and will include some performance comparisons between the models included in this benchmark and data binding alternatives.

Click on the links here or in the menu at left for details on the test methodology, test documents, and document models, as well as the actual test results and conclusions. You can also find instructions for downloading the test program and related files here, along with basic usage information.