Document models, Part 1: Performance

A look at features and performance of XML document models in Java

Return to article

XMLBench download

The XMLBench test program I used to measure Java document model performance is structured as a test driver with extensions for each supported model. The test driver calls virtual methods that need to be implemented for each document model to actually run the tests. Test implementations for the models discussed in the article are included in the downloads from this page.

The program is available here in two forms. Downloading the code jar gives source code, JavaDocs, and class files for the program. In order to actually run any tests you'll need to also have the jar files for the document models you're testing, along with any supporting libraries.

The full jar provides everything you need to build the program and run the tests, including the versions of the document model jars used for the published test results. This includes the Electric XML jar file, so you'll need to agree to the terms of the license for that product as it applies to the exml.jar file included in the distribution. This license applies only to that particular file, and you can void the license by deleting the file from your system after downloading and unpacking the distribution jar.

Both distribution jars include an Ant build.xml file to build the project. The full jar also includes the and files that show the classpath settings used for these tests, as well as most of the test documents. Only the nt.xml file is omitted from the full jar. The license for this file requires that it only be distributed in combination with several other related files which were not used for these tests. One place you can obtain this set of files is

The main class for the program is com.sosnoski.xmlbench.XMLBench. If executed without command line parameters, it prints a summary of the parameters, which include a variety of possible output formats and test variations.

EXML license


Please read this license agreement carefully. Your use of Electric XML or any related documentation indicates your acceptance of the following terms and conditions. If you do not agree to these terms and conditions, you may not install or use Electric XML.

1. Ownership and License

Electric XML is owned by The Mind Electric and is copyrighted and licensed, not sold. The Mind Electric grants you a non-exclusive, non-transferable license to use, modify and distribute Electric XML in both binary and source form as long as all of the following conditions are met:

  • You are not bundling Electric XML or a derivative of it as part of a software development environment such as JBuilder, WebGain or VisualAge. Note that this restriction is targeted at IDE vendors, and does not prevent developers from loading Electric XML into an IDE and using it during everyday development.
  • You are not integrating Electric XML or a derivative of it into a distribued computing infrastructure or database platform such as WebLogic, Apache SOAP, WebSphere, Oracle application server, or HP e-speak. Note that this restriction is targeted at software infrastructure vendors, and does not prevent developers from using and bundling Electric XML with applications that run on these platforms.
  • You are not integrating Electric XML or a derivative of it into an alternative to Electric XML such as Xerces or JDOM.
  • You must not remove any of the copyright information from the Electric XML source code or documentation.

If you cannot meet all of these conditions, please contact us to arrange a special custom license.

2. Term and Termination

This Agreement is effective until terminated. You may terminate this Agreement at any time by destroying all copies of Electric XML. This Agreement will terminate immediately without notice from The Mind Electric if you fail to comply with any provision of this Agreement. Upon termination, you must destroy all copies of Electric XML.

3. Warranty Disclaimer and Limitation of Liability

The Mind Electric licenses the Software to you on an "as is" basis, without warranty of any kind. The Mind Electric hereby expressly disclaims all warranties or conditions, either express or implied, including, but not limited to, the implied warranties or conditions of merchantability and fitness for a particular purpose. You are solely responsible for determining the appropriateness of using Electic XML and assume all risks associated with the use of it, including but not limited to the risks of program errors, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. Some jurisdictions do not allow for the exclusion or limitation of implied warranties, so the above limitations or exclusions may not apply to you.

The Mind Electric will not be liable for any direct damages or for any special, incidental, or indirect damages or for any economic consequential damages (including lost profits or savings), even if The Mind Electric has been advised of the possibility of such damages. The Mind Electric will not be liable for the loss of, or damage to, your records or data, or any damages claimed by you based on a third party claim. Some jurisdictions do not allow for the exclusion or limitation of incidental or consequential damages, so the above limitations or exclusions may not apply to you.

4. General

This Agreement is governed by the laws of the State of Texas. This Agreement is the only understanding and agreement we have regarding your use of Electric XML. It supersedes all other communications, understandings or agreements we may have had prior to this Agreement.

Return to article