public class XPath extends Object
Constructor and Description |
---|
XPath() |
Modifier and Type | Method and Description |
---|---|
static Node |
selectNode(String path,
Object node) |
static Node |
selectNode(String path,
Object node,
Map<String,String> namespaces) |
static NodeList |
selectNodes(String path,
Object node)
Select all nodes that are selected by this XPath expression.
|
static NodeList |
selectNodes(String path,
Object node,
Map<String,String> namespaces)
Select all nodes that are selected by this XPath expression.
|
static String |
selectText(String path,
Object node) |
static String |
selectText(String path,
Object node,
Map<String,String> namespaces) |
public static NodeList selectNodes(String path, Object node, Map<String,String> namespaces)
path
- the xpath expressionnode
- the starting nodenamespaces
- Namespaces that need to be available in the xpath, where the key is the
prefix and the value the namespace URIpublic static NodeList selectNodes(String path, Object node)
path
- the xpath expressionnode
- the starting nodepublic static String selectText(String path, Object node, Map<String,String> namespaces)
path
- the XPath to executenode
- the node, node-set or Context object for evaluation. This value can be null.namespaces
- the XML namespaces map