XPath represents an XPath expression after it has been parsed
from a String.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: The boolean-value interpretation of this expression.The node, nodeset or Context object for evaluation. This value
can be null context)Retrieve a boolean-value interpretation of this XPath expression when evaluated against a given context. |
| public Object | |
| public FunctionContext | |
| public NamespaceContext | |
| public String | Returns: the textual format of the XPath expression.
|
| public VariableContext | |
| public boolean | Returns: true if the given node matches this XPath expressionDOCUMENT ME! node)Redeclares org. matches returns true if the given node matches the XPath
expression.
|
| public Number | Returns: the numeric result of the XPath expression or null if the result is not a number.is either a node or a list of nodes on which to evalute the
XPath context)
|
| public List | Returns: the results of all the XPath evaluations as a single listis either a node or a list of nodes on which to evalute the
XPath context)
|
| public List | Returns: a list ofNode instancesis either a node or a list of nodes on which to evalute the
XPath context, XPath is the XPath expression to sort by sortXPath)
|
| public List | Returns: a list ofNode instancesis either a node or a list of nodes on which to evalute the
XPath context, XPath is the XPath expression to sort by sortXPath, boolean specifies whether or not duplicate values of the sort
expression are allowed. If this parameter is true then only
distinct sort expressions values are included in the result distinct)
|
| public Object | selectObject(Object
is either a node or a list of nodes on which to evalute the
XPath context)
Deprecated
please use evaluate(Object) instead. WILL BE REMOVED IN
dom4j-1.6 !!
selectObject evaluates an XPath expression and returns the
result as an Object.
|
| public Node | Returns: a single matchingNode instanceis either a node or a list of nodes on which to evalute the
XPath context)
|
| public void | setFunctionContext(FunctionContext
DOCUMENT ME! functionContext)Sets the function context to be used when evaluating XPath expressions |
| public void | setNamespaceContext(NamespaceContext
DOCUMENT ME! namespaceContext)Sets the namespace context to be used when evaluating XPath expressions |
| public void | setNamespaceURIs(Map<String, String>
the map containing the namespace mappings map)Sets the current NamespaceContext from a Map where the keys are the String namespace prefixes and the values are the namespace URIs. |
| public void | setVariableContext(VariableContext
DOCUMENT ME! variableContext)Sets the variable context to be used when evaluating XPath expressions |
| public void | sort(List<Node>
is the list of Nodes to sort list)
|
| public void | sort(List<Node>
is the list of Nodes to sort list, boolean if true then duplicate values (using the sortXPath for
comparisions) will be removed from the List distinct)
|
| public String |
| booleanValueOf | back to summary |
|---|---|
| public boolean booleanValueOf(Object context) Retrieve a boolean-value interpretation of this XPath expression when
evaluated against a given context.
The boolean-value of the expression is determined per the
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(Object context)
| |
| getFunctionContext | back to summary |
|---|---|
| public FunctionContext getFunctionContext() DOCUMENT ME!
| |
| getNamespaceContext | back to summary |
|---|---|
| public NamespaceContext getNamespaceContext() DOCUMENT ME!
| |
| getText | back to summary |
|---|---|
| public String getText()
| |
| getVariableContext | back to summary |
|---|---|
| public VariableContext getVariableContext() DOCUMENT ME!
| |
| matches | back to summary |
|---|---|
| public boolean matches(Node node) Redeclares org.
| |
| numberValueOf | back to summary |
|---|---|
| public Number numberValueOf(Object context)
| |
| selectNodes | back to summary |
|---|---|
| public List
| |
| selectNodes | back to summary |
|---|---|
| public List
| |
| selectNodes | back to summary |
|---|---|
| public List
| |
| selectObject | back to summary |
|---|---|
| public Object selectObject(Object context)
Deprecated please use evaluate(Object) instead. WILL BE REMOVED IN dom4j-1.6 !!
| |
| selectSingleNode | back to summary |
|---|---|
| public Node selectSingleNode(Object context)
| |
| setFunctionContext | back to summary |
|---|---|
| public void setFunctionContext(FunctionContext functionContext) Sets the function context to be used when evaluating XPath expressions
| |
| setNamespaceContext | back to summary |
|---|---|
| public void setNamespaceContext(NamespaceContext namespaceContext) Sets the namespace context to be used when evaluating XPath expressions
| |
| setNamespaceURIs | back to summary |
|---|---|
| public void setNamespaceURIs(Map<String, String> map) Sets the current NamespaceContext from a Map where the keys are the String namespace prefixes and the values are the namespace URIs. For example:
Map uris = new HashMap();
uris.put("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
uris.put("m", "urn:xmethodsBabelFish");
XPath xpath = document
.createXPath("SOAP-ENV:Envelope/SOAP-ENV:Body/m:BabelFish");
xpath.setNamespaceURIs(uris);
Node babelfish = xpath.selectSingleNode(document);
| |
| setVariableContext | back to summary |
|---|---|
| public void setVariableContext(VariableContext variableContext) Sets the variable context to be used when evaluating XPath expressions
| |
| sort | back to summary |
|---|---|
| public void sort(List<Node> list)
| |
| sort | back to summary |
|---|---|
| public void sort(List<Node> list, boolean distinct)
| |
| valueOf | back to summary |
|---|---|
| public String valueOf(Object context)
| |