play.libs
类 XPath

java.lang.Object
  继承者 play.libs.XPath

public class XPath
extends java.lang.Object

XPath for parsing


构造方法摘要
XPath()
           
 
方法摘要
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 attribute
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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

XPath

public XPath()
方法详细信息

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,

参数:
path -
node -
namespaces - Namespaces that need to be available in the xpath, where the key is the prefix and the value the namespace URI
返回:

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,

参数:
path -
node -
返回:

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

参数:
path - the XPath to execute
node - the node, node-set or Context object for evaluation. This value can be null.

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

参数:
path - the XPath to execute
node - the node, node-set or Context object for evaluation. This value can be null.


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly