See javasoft for the recently released JAXP 1.1 (Final release, not beta) for a reference implementation of a
Java XML API.
"The JavaTM API for XML Processing (JAXP) Optional Package enables applications to parse and transform XML documents using a pure Java API that is independent of a particular XML processor implementation. Depending on the needs of the application, developers have the flexibility to swap between XML processors (such as high performance vs. memory conservative parsers) without making application code changes. Thus, application and tools developers can rapidly and easily XML-enable their Java applications for e-commerce, application integration, and dynamic web publishing."
http://www.javasoft.com/xml/download.html