How do you need to access your data?
If it is a single pass, then you do not need to build a tree in memory. You can use SAX (fast, simple) or StAX (faster, not really like that).
If you need to keep the tree in memory for navigation, XOM or JDOM is a good choice. DOM is the choice of the last resort, be it level 1, 2 or 3, with or without extensions.
Xerces, which is a parser included in Java (although you should get an updated version from Apache and not use the one bundled with Java, even in version 6.0), also has a proprietary XNI interface.
If you want to link other finished parts in a chain, often SAX or StAX work well, as they can create their own model in memory. For example, the Saxon XSLT / XQuery engine works with the DOM, SAX, or StAX, but is built inside TinyTree (by default) or DOM (optional). DataDirect XQuery also works with SAX, StAX or DOM, but actually likes StAX.
source share