Package play.libs
Class XPath
- java.lang.Object
-
- play.libs.XPath
-
public class XPath extends java.lang.Object
XPath for parsing
-
-
Constructor Summary
Constructors Constructor Description XPath()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.Node
selectNode(java.lang.String path, java.lang.Object node)
static org.w3c.dom.Node
selectNode(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.String> namespaces)
static java.util.List<org.w3c.dom.Node>
selectNodes(java.lang.String path, java.lang.Object node)
Select all nodes that are selected by this XPath expression.static java.util.List<org.w3c.dom.Node>
selectNodes(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.String> namespaces)
Select all nodes that are selected by this XPath expression.static java.lang.String
selectText(java.lang.String path, java.lang.Object node)
Return the text of a node, or the value of an attributestatic java.lang.String
selectText(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.String> namespaces)
Return the text of a node, or the value of an attribute
-
-
-
Method Detail
-
selectNodes
public static java.util.List<org.w3c.dom.Node> selectNodes(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.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
- Path expressionnode
- The node objectnamespaces
- Namespaces that need to be available in the xpath, where the key is the prefix and the value the namespace URI- Returns:
- Nodes in document-order
-
selectNodes
public static java.util.List<org.w3c.dom.Node> selectNodes(java.lang.String path, java.lang.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
- Path expressionnode
- The node object- Returns:
- Nodes in document-order
-
selectNode
public static org.w3c.dom.Node selectNode(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.String> namespaces)
-
selectNode
public static org.w3c.dom.Node selectNode(java.lang.String path, java.lang.Object node)
-
selectText
public static java.lang.String selectText(java.lang.String path, java.lang.Object node, java.util.Map<java.lang.String,java.lang.String> namespaces)
Return the text of a node, or the value of an attribute- Parameters:
path
- the XPath to executenode
- the node, node-set or Context object for evaluation. This value can be null.namespaces
- The name spaces- Returns:
- The text of a node
-
selectText
public static java.lang.String selectText(java.lang.String path, java.lang.Object node)
Return the text of a node, or the value of an attribute- 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
-
-