Mukund Raghavachari from IBM Research is the leader of the team that wrote the XML Enhancements for Java (XJ) package that is part of the ETTK. I talked to him about the motivation for the approach taken by XJ - to put XML support natively in to the programming language. Here are his thoughts:
Given the increasing importance of XML in today's world, people have come up with different ways of simplifying XML processing. The drawbacks of runtime APIs such as DOM is that it leads to verbose and fragile code. Imagine programming in Java with just the java.lang.Object class and reflection; you'd have to access fields of a class by passing the names of the fields as strings to the reflection API and perform several 'instanceof' checks to make sure that the class actually had a field of its name. If the class structure changed, you'd have to search through your code to find which portions to change. In some sense, DOM programmers are in this situation.
Another way of integrating XML support into the programming model are data binding tools such as JAXB. You give the tool a schema (perhaps, annotated) and it generates a bunch of Java classes from the Schema. The advantage of this approach over DOM is that the generated classes are based on the XML Schema. So, you get some static typechecking and access XML data using standard Java idioms. The disadvantage of this approach is that there are clear distinctions between the XML Schema type system and the Java type system. The Java type system cannot express XML Schema constructs such as order between element children, differences between attributes and elements, etc. Recently, there was a nice summary of the drawbacks of data binding approaches from HP Labs (http://www.hpl.hp.com/techreports/2005/HPL-2005-83.html).
We believe that the HP Labs folks didn't go far enough in their solution to the data binding problem. By integrating XML support into the language itself, you get the benefits of all approaches. You get XML fidelity because language understands XML and the XML Schema type system, you get ease of use because the programmer can access XML data in a natural manner, and you get good performance because the compiler can optimize accesses to XML data. This, in essence, is the motivation behind the XML Enhancements for Java project, which integrates XML into Java in an intuitive and clean manner. A language-based solution avoids the restriction that runtime solutions (which both DOM and data binding solutions are) face --- it does not have to fit a square peg into a round hole (XML into Java). A language solution can reshape the hole (hopefully, cleanly) so that it is square.