public class NodeVariable extends Object
node variable for sub-queries and scripts that wraps
the node selected by an XPath query, exposing useful methods.| Constructor and Description |
|---|
NodeVariable(scriptella.driver.xpath.XPathExpressionCompiler compiler,
Node node) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String expression)
Gets the text value(s) of the node(s) selected by the specified XPath expression.
|
String |
getString(String expression)
Gets the string value of the first selected node by the specified XPath expression.
|
String |
getString(String expression,
String ifNull)
Gets the string value of the first selected node by the specified XPath expression.
|
String[] |
getStringArray(String expression)
Gets the text values of the nodes selected by the specified XPath expression.
|
void |
remove()
Removes this node from the document.
|
public static final String NAME
public NodeVariable(scriptella.driver.xpath.XPathExpressionCompiler compiler,
Node node)
public String[] getStringArray(String expression)
expression - xpath expression to evaluate.public String getString(String expression)
expression - xpath expression to evaluate.public String getString(String expression, String ifNull)
expression - xpath expression to evaluate.ifNull - String to return if the specified expression evaluates to null.public Object get(String expression)
expression - xpath expression to evaluate.public void remove()
Copyright © 2006–2019. All rights reserved.