org.apache.xpath
public class XPathAPI extends Object
See Also: XPath Specification
Method Summary | |
---|---|
static XObject | eval(Node contextNode, String str)
Evaluate XPath string to an XObject. |
static XObject | eval(Node contextNode, String str, Node namespaceNode)
Evaluate XPath string to an XObject.
|
static XObject | eval(Node contextNode, String str, PrefixResolver prefixResolver)
Evaluate XPath string to an XObject.
|
static NodeIterator | selectNodeIterator(Node contextNode, String str)
Use an XPath string to select a nodelist.
|
static NodeIterator | selectNodeIterator(Node contextNode, String str, Node namespaceNode)
Use an XPath string to select a nodelist.
|
static NodeList | selectNodeList(Node contextNode, String str)
Use an XPath string to select a nodelist.
|
static NodeList | selectNodeList(Node contextNode, String str, Node namespaceNode)
Use an XPath string to select a nodelist.
|
static Node | selectSingleNode(Node contextNode, String str)
Use an XPath string to select a single node. |
static Node | selectSingleNode(Node contextNode, String str, Node namespaceNode)
Use an XPath string to select a single node.
|
Parameters: contextNode The node to start searching from. str A valid XPath string.
Returns: An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.
Throws: TransformerException
Parameters: 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.
Returns: An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.
Throws: TransformerException
Parameters: 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.
Returns: An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.
Throws: TransformerException
Parameters: contextNode The node to start searching from. str A valid XPath string.
Returns: A NodeIterator, should never be null.
Throws: TransformerException
Parameters: 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.
Returns: A NodeIterator, should never be null.
Throws: TransformerException
Parameters: contextNode The node to start searching from. str A valid XPath string.
Returns: A NodeIterator, should never be null.
Throws: TransformerException
Parameters: 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.
Returns: A NodeIterator, should never be null.
Throws: TransformerException
Parameters: contextNode The node to start searching from. str A valid XPath string.
Returns: The first node found that matches the XPath, or null.
Throws: TransformerException
Parameters: 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.
Returns: The first node found that matches the XPath, or null.
Throws: TransformerException