The testxpath tool enables you to test XPath expressions against a standard document. The XPath expression will be evaluated against the provided document and the result returned. To use the testxpath tool, type the following command:
Tool testxpath <sampledocument>
Assume that the standard document is the same one as shown in the testfuncs tool example:
Enter command:>tool testxpath \smalldoc.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<a>
<top>
<b>one</b>
<b>two</b>
<x>sreg(iwayhome)</x>
</top>
</a>Now enter an XPath expression against the sample document:
xpath->/a/top/b[1]
<superRoot [baseNode]>
<a [baseNode]/>
<top [baseNode]/>
<b [baseNode]>
<functionPredicate [filterInt]>1</functionPredicate>
</b>
</superRoot>
values->'one'
tree-><?xml version="1.0" encoding="ISO-8859-1" ?>
<xpathresult>
<b>one</b>
</xpathresult>
list-><b>one [parent=top]
xpath->