Firstly, I'd suggest that in Java you consider using JDOM or XOM rather than the DOM, they are much easier to work with, and much more Java-friendly.
Secondly, for any of these object models you'll find a number of XPath processors available. Saxon, for example, offers a Java API that will access DOM or JDOM trees. The XPath processor may come from a different source than the object model implementation.
There's a standard XPath API coming along in JDK 1.5 that's designed to work with any document model, but not everyone supports it yet (it's very new).
Michael Kay
http://www.saxonica.com/