Package play.libs
Class XPath
- Object
-
- play.libs.XPath
-
public class XPath extends Object
XPath for parsing
-
-
Constructor Summary
Constructors Constructor Description XPath()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
selectNodes
public static NodeList selectNodes(String path, Object node, Map<String,String> namespaces)
Select all nodes that are selected by this XPath expression. If multiple nodes match, multiple nodes will be returned. Nodes will be returned in document-order,- Parameters:
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 URI- Returns:
- result of evaluating the xpath expression against node
-
selectNodes
public static NodeList selectNodes(String path, Object node)
Select all nodes that are selected by this XPath expression. If multiple nodes match, multiple nodes will be returned. Nodes will be returned in document-order,- Parameters:
path
- the xpath expressionnode
- the starting node- Returns:
- result of evaluating the xpath expression against node
-
selectText
public static String selectText(String path, Object node, Map<String,String> namespaces)
- Parameters:
path
- the XPath to executenode
- the node, node-set or Context object for evaluation. This value can be null.namespaces
- the XML namespaces map- Returns:
- the text of a node, or the value of an attribute
-
-