|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.xpath.XPathExpression
public final class XPathExpression
XPathExpression represents a compiled XPath expression that can be repeatedly evaluated.
Note that the object contains the context node, so it is not thread-safe.
| Constructor Summary | |
|---|---|
protected |
XPathExpression(Expression exp,
DocumentInfo doc)
The constructor is protected, to ensure that instances can only be created using the createExpression() method of XPathEvaluator |
| Method Summary | |
|---|---|
List |
evaluate()
Execute a prepared XPath expression, returning the results as a List. |
Object |
evaluateSingle()
Execute a prepared XPath expression, returning the first item in the result. |
SequenceIterator |
rawIterator()
Get a raw iterator over the results of the expression. |
void |
setContextNode(NodeInfo node)
Set the context node for evaluating the expression. |
void |
setSortKey(XPathExpression sortKey)
Define the sort order for the results of the expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected XPathExpression(Expression exp,
DocumentInfo doc)
| Method Detail |
|---|
public void setSortKey(XPathExpression sortKey)
sortKey - an XPathExpression, which will be applied to each item in the sequence;
the result of this expression determines the ordering of the list returned by the evaluate()
method. The sortKey can be null, to clear a previous sort key.public void setContextNode(NodeInfo node)
public List evaluate()
throws XPathException
XPathException
public Object evaluateSingle()
throws XPathException
XPathException
public SequenceIterator rawIterator()
throws XPathException
XPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||