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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.