-
Notifications
You must be signed in to change notification settings - Fork 118
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:
- changes to the API are possible
- 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
- 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.
- Generics
- Namespaces In Scope
- Collections (and Iterators)
- XPath Upgrade
- Extended Filter Interface
- Content.CType
- AttributeType Enumeration
- SAX Parsing Updates
- StAX Support
Attribute is Content- Outputter Updates
- End-of-line Sequence
- JDOMConstants
- Element.sort*(Comparator<...>)
- Reduced Memory Footprint
- Specified Attributes
- XMLBaseURI
- Text Coalesce
- Location-Aware Content
In addition to the major extensions and features above a number of other notable changes have been made too.
Serialization has been completely audited, revamped, and tested. All core JDOM content is completely serializable. This includes: Namespace, Attribute, all Parent, and all Content.
Clonable has been completely audited, revamped, and tested. All core JDOM content is completely cloneable. This includes: Attribute, all Parent, and all Content. Namespace is not Clonable. In addition, the clone() method has been made to have a covariant return type for each of these classes, thus Element.clone()
returns Element
, Text.clone()
returns Text
, etc.
Cloning JDOM content will always result in a 'deep' clone, and the cloned content will always be detached. You cannot change any infomation related to the original content by changing the clone, and visa-versa.
[JDOM Home](http://www.jdom.org)
Stable Release
- [Download](http://www.jdom.org/downloads/index.html)
- [JavaDoc](http://www.jdom.org/docs/apidocs/index.html)
JDOM 2.x
- Overview
- Getting Started
- JDOM on Android
- [JavaDoc](http://hunterhacker.github.com/jdom/jdom2/apidocs/index.html)
- [Coverage](http://hunterhacker.github.com/jdom/jdom2/coverage/index.html)
- [UnitTests](http://hunterhacker.github.com/jdom/jdom2/junit.report/index.html)
- Features
- JDOM 1.x to JDOM 2.x
- Dependencies
Developing JDOM