You must download the latest version of Commons JXPath, and place the
Commons JXPath JAR
in your
project’s classpath. Following the steps outlined in
Recipe 1.1, download Commons JXPath 1.2
instead of Commons Lang.
Commons JXPath provides a mechanism for evaluating XML Path Language (XPath) expressions against objects and various data structures in Java. This unconventional application of XPath to objects enables a developer to traverse, address, and filter specific nodes or locations in a complex object graph. This chapter details a few of the ways in which JXPath can be used to search, select, and filter objects.
If you have a Maven project that needs to use Commons JXPath, add a
dependency on Commons JXPath 1.2 with the following section in
project.xml
:
<dependencies> <dependency> <id>commons-jxpath</id> <version>1.2</version> </dependency> ....other dependencies... </dependencies>
For more information about Commons JXPath, see the Commons JXPath project page at http://jakarta.apache.org/commons/jxpath. For more information about XPath, see the official W3C XPath recommendation at http://www.w3.org/TR/xpath.
18.116.12.11