public class XPathAPI
extends java.lang.Object
| Constructor and Description |
|---|
XPathAPI() |
| Modifier and Type | Method and Description |
|---|---|
static XObject |
eval(Node contextNode,
java.lang.String str)
Evaluate XPath string to an XObject.
|
static XObject |
eval(Node contextNode,
java.lang.String str,
Node namespaceNode)
Evaluate XPath string to an XObject.
|
static XObject |
eval(Node contextNode,
java.lang.String str,
PrefixResolver prefixResolver)
Evaluate XPath string to an XObject.
|
static NodeIterator |
selectNodeIterator(Node contextNode,
java.lang.String str)
Use an XPath string to select a nodelist.
|
static NodeIterator |
selectNodeIterator(Node contextNode,
java.lang.String str,
Node namespaceNode)
Use an XPath string to select a nodelist.
|
static NodeList |
selectNodeList(Node contextNode,
java.lang.String str)
Use an XPath string to select a nodelist.
|
static NodeList |
selectNodeList(Node contextNode,
java.lang.String str,
Node namespaceNode)
Use an XPath string to select a nodelist.
|
static Node |
selectSingleNode(Node contextNode,
java.lang.String str)
Use an XPath string to select a single node.
|
static Node |
selectSingleNode(Node contextNode,
java.lang.String str,
Node namespaceNode)
Use an XPath string to select a single node.
|
public static Node selectSingleNode(Node contextNode, java.lang.String str) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.TransformerExceptionpublic static Node selectSingleNode(Node contextNode, java.lang.String str, Node namespaceNode) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.TransformerExceptionpublic static NodeIterator selectNodeIterator(Node contextNode, java.lang.String str) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.TransformerExceptionpublic static NodeIterator selectNodeIterator(Node contextNode, java.lang.String str, Node namespaceNode) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.TransformerExceptionpublic static NodeList selectNodeList(Node contextNode, java.lang.String str) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.TransformerExceptionpublic static NodeList selectNodeList(Node contextNode, java.lang.String str, Node namespaceNode) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.TransformerExceptionpublic static XObject eval(Node contextNode, java.lang.String str) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.TransformerExceptionXObject,
XNull,
XBoolean,
XNumber,
XString,
XRTreeFragpublic static XObject eval(Node contextNode, java.lang.String str, Node namespaceNode) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.TransformerExceptionXObject,
XNull,
XBoolean,
XNumber,
XString,
XRTreeFragpublic static XObject eval(Node contextNode, java.lang.String str, PrefixResolver prefixResolver) throws TransformerException
contextNode - The node to start searching from.str - A valid XPath string.prefixResolver - Will be called if the parser encounters namespace
prefixes, to resolve the prefixes to URLs.TransformerExceptionXObject,
XNull,
XBoolean,
XNumber,
XString,
XRTreeFragCopyright © 2014 Apache XML Project. All Rights Reserved.