Additional Saxon methods
Saxon's implementation of XPathExpression
(namely net.sf.saxon.xpath.XPathExpressionImpl
)
provides additional methods for evaluating the XPath expression. In particular the rawIterator()
method with no arguments returns a Saxon SequenceIterator
which allows the application to process
the results of any XPath expression, with no conversion: all values will be represented using a native Saxon class,
for example a node will be represented as a NodeInfo
and a QName as a QNameValue
.
The NodeInfo
interface is described in the next section, The NodeInfo interface.
You can call methods directly on the NodeInfo
object to get information about a node: for
example getDisplayName()
gets the name of the node in a form suitable for display, and
getStringValue()
gets the string value of the node, as defined in the XPath data model. You
can also use the node as the context node for evaluation of subsequent expressions.