There are so many alternatives when it comes to parse XML in Java. The popular ones being used are JAXP, Xerces2, SAX–> JDOM (higher level)–> JAXB (even higher level).
My personal favoraite for parsing only is dom4j. It supports XPATH like the following:
SAXReader reader = new SAXReader(); Document document = reader.read( url ); List links = document.selectNodes( "//a[@href]" ); String title = document.valueOf( "/head/title" );
Most of time it can do the job to reteriving the value given the path for me.
http://www-128.ibm.com/developerworks/xml/library/x-injava/index.html does a perforamance. comparison on XML parser in Java. DOM4J scores pretty high.