Package play.libs
Class XPath
java.lang.Object
play.libs.XPath
XPath for parsing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeselectNode(String path, Object node) static Nodestatic NodeListselectNodes(String path, Object node) Select all nodes that are selected by this XPath expression.static NodeListSelect all nodes that are selected by this XPath expression.static StringselectText(String path, Object node) static String
-
Constructor Details
-
XPath
public XPath()
-
-
Method Details
-
selectNodes
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
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
-
selectNode
-
selectNode
-
selectText
- 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
-
selectText
- Parameters:
path- the XPath to executenode- the node, node-set or Context object for evaluation. This value can be null.- Returns:
- the text of a node, or the value of an attribute
-