public class XPathAPI extends Object
Constructor and Description |
---|
XPathAPI() |
Modifier and Type | Method and Description |
---|---|
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 org.w3c.dom.traversal.NodeIterator |
selectNodeIterator(Node contextNode,
String str)
Use an XPath string to select a nodelist.
|
static org.w3c.dom.traversal.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.
|
public static Node selectSingleNode(Node contextNode, String str) throws TransformerException
contextNode
- The node to start searching from.str
- A valid XPath string.TransformerException
public static Node selectSingleNode(Node contextNode, 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.TransformerException
public static org.w3c.dom.traversal.NodeIterator selectNodeIterator(Node contextNode, String str) throws TransformerException
contextNode
- The node to start searching from.str
- A valid XPath string.TransformerException
public static org.w3c.dom.traversal.NodeIterator selectNodeIterator(Node contextNode, 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.TransformerException
public static NodeList selectNodeList(Node contextNode, String str) throws TransformerException
contextNode
- The node to start searching from.str
- A valid XPath string.TransformerException
public static NodeList selectNodeList(Node contextNode, 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.TransformerException
public static XObject eval(Node contextNode, String str) throws TransformerException
contextNode
- The node to start searching from.str
- A valid XPath string.TransformerException
XObject
,
XNull
,
XBoolean
,
XNumber
,
XString
,
XRTreeFrag
public static XObject eval(Node contextNode, 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.TransformerException
XObject
,
XNull
,
XBoolean
,
XNumber
,
XString
,
XRTreeFrag
public static XObject eval(Node contextNode, 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.TransformerException
XObject
,
XNull
,
XBoolean
,
XNumber
,
XString
,
XRTreeFrag
Copyright © 2017 JBoss by Red Hat. All rights reserved.