O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Navigating the Document Via XPath in Java

Another important method for navigating XML documents is via XPath. XPath is a non-XML based specification for addressing arbitrary locations in XML Documents. The XPath syntax is described in detail in Chapter 11, “Locating Components in XML Documents with XPath.” A basic usage of XPath with Java is provided in this section.

Unfortunately, a standard interface for XPath is not yet part of the standard Java API for XML provided by Sun. However, a robust implementation available for XPath works seamlessly with implementations of the Java API for XML like Xerces and Xalan. That XPath implementation is called Jaxen (available at http://jaxen.org).

Jaxen is a native Java implementation of the full XPath Specification ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required