Skip to content

JDOM2 Feature AttributeType Enumeration

rolfl edited this page Apr 8, 2012 · 2 revisions

Attributes have an Attribute Type. Many XML Users are unfamiliar with this, and I would guess that the concept of Attribute Types (except the 'ID' type which people seldom know they are using) is perhaps the most unused feature of XML. In JDOM 1.x the type was expressed using an int constant and lookup tables to convert the constant to a name.

JDOM2 has replaced this system with an AttributeType enumeration (org.jdom2.AttributeType).

The way it has been done makes it possible in most cases to do a simple re-compile for JDOM2. In some cases though you will need to change your variables from int to AttributeType (if you have code that is saving the type somewhere). If you are just referencing existing constants then it should all 'just work'.

Clone this wiki locally