Java developers might prefer JDOM in the future,a more Java-oriented API for reading and writing XML Documents. JDOM was created by Brett McLaughlin and Jason Hunter as an open source project, available from the JDOM site . The DOM makes very limited use of the Java class library. Many features have been reinvented, for instance creating a NodeIterator instead of using java.util.Iterator .
Some areas have a weak design.
Method overloading is not used because not all programming languages support it, for instance JavaScript. Named constants are often short integer instead of constant objects. There is only one kind of exception, details are provided by constants instead of having an exception class hierarchy. Unexpected behavior can result in that the value of a non-empty element is defined to be null, raising the widely popular java.lang.NullPointerException . Some DOM implementations also allow the creation of malformed documents.