Elliotte Rusty Harold has written two (as always) excellent articles about how to use the Java API for XML Processing (JAXP).
The first article covers the XPathFactory part of the API and highlights issues like setting namespace prefix mappings.
The Java XPath API
The second article describes the validation API introduced in JAXP 1.3 and also gives an overview of how to get type information for specific elements and attributes.
The Java XML Validation API
Updated the list of JAXP Factory Implementations.
Added SchemaFactory implementations, removed the SAXParserFactory implementation for Saxon B and Saxon SA and updated the current versions.