Interface XPathExpr
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultXPathExpr
A wrapper around an XPath expression.
-
Method Summary
Modifier and TypeMethodDescriptionEvaluates the expression and returns a list cintaing the resulting nodes, or a singleton list containing aDouble,String, orBoolean.Returns the wrapped expression object.getText()Returns a String containing the XPath expression.voidsetRootExpr(Expr rootExpr) Changes the wrapped expression object.voidsimplify()Simplifies the XPath expression.
-
Method Details
-
getRootExpr
-
setRootExpr
Changes the wrapped expression object.- Parameters:
rootExpr- the new expression object to wrap
-
getText
String getText()Returns a String containing the XPath expression.- Returns:
- the text form of this XPath expression
-
simplify
void simplify()Simplifies the XPath expression. For example, the expression//para[1 = 1]could be simplified to//para. In practice, this is usually a noop. Jaxen does not currently perform any simplification. -
asList
Evaluates the expression and returns a list cintaing the resulting nodes, or a singleton list containing aDouble,String, orBoolean.- Parameters:
context- the context in which to evaluate this expression- Returns:
- a list
- Throws:
JaxenException
-