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:
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.