Constructor and Description |
---|
XPathUtil() |
public static XPath createXPath()
XPath
public static Element getElementByXPath(String expression, Object source)
expression
- XPath表达式source
- 资源,可以是Docunent、Node节点等public static NodeList getNodeListByXPath(String expression, Object source)
expression
- XPath表达式source
- 资源,可以是Docunent、Node节点等public static Node getNodeByXPath(String expression, Object source)
expression
- XPath表达式source
- 资源,可以是Docunent、Node节点等public static Object getByXPath(String expression, Object source, QName returnType)
expression
- XPath表达式source
- 资源,可以是Docunent、Node节点等returnType
- 返回类型,XPathConstants
public static Object getByXPath(String expression, Object source, QName returnType, NamespaceContext nsContext)
expression
- XPath表达式source
- 资源,可以是Docunent、Node节点等returnType
- 返回类型,XPathConstants
nsContext
- NamespaceContext
Copyright © 2025. All rights reserved.