Skip to content


Subversion checkout URL

You can clone with
Download ZIP

JDOM2 Features

Rolf edited this page · 39 revisions

JDOM2 Features

Apart from the details described below, it is important not to forget that JDOM2 is delivered with a completely different package name: - all JDOM2 classes are now in the org.jdom2.* package hierarchy.

This change is guaranteed to break all compatibility with JDOM1. The decision was made to do it this way so that:

  1. changes to the API are possible
  2. JDOM users will need to re-visit their code to change the import statements (at least) and at that time they can take advantage of other JDOM2 features
  3. it is possible to simultaneously run both JDOM and JDOM2 in the same Java VM if necessary.

In addition to this obvious change, there are a lot of other changes.

In addition to the major extensions and features above a number of other notable changes have been made too.


There were a number of places in JDOM where reflection and introspection was used to determine what features were available. This sort of logic was required to support Java 1.2 while still also making certain Java 1.4 functionality possible. These places have been stripped and replaced with cleaner direct access to code functionality, which now effectively precludes support for previous versions of Java, but that's what JDOM2 is all about.


This interface has been slightly extended to include methods for handling Attributes with the new AttributeType enum. Additionally, there is now a setRoot() factory method.

Something went wrong with that request. Please try again.