Package com.aeontronix.commons.xml
Class XPathUtils
java.lang.Object
com.aeontronix.commons.xml.XPathUtils
Various XPath related utility functions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Objectstatic ObjectevalXPath(String xpath, InputSource source, QName type) static BooleanevalXPathBoolean(String xpath, Node source) static BooleanevalXPathBoolean(String xpath, InputSource source) static ElementevalXPathElement(String xpath, Node source) static ElementevalXPathElement(String xpath, InputSource source) evalXPathElements(String xpath, Node source) evalXPathElements(String xpath, InputSource source) static NodeevalXPathNode(String xpath, Node source) static NodeevalXPathNode(String xpath, InputSource source) evalXPathNodes(String xpath, Node source) evalXPathNodes(String xpath, InputSource source) static StringevalXPathString(String xpath, Node source) static StringevalXPathString(String xpath, InputSource source) evalXPathTextElements(String xpath, Node source) evalXPathTextElements(String xpath, InputSource source) static XPathExpressionstatic XPathExpressionstatic XPathFactorytoTextContent(List<Node> nodes)
-
Constructor Details
-
XPathUtils
public XPathUtils()
-
-
Method Details
-
newXPathFactory
-
newXPath
- Throws:
XPathExpressionException
-
newXPath
public static XPathExpression newXPath(String xpath, Map<String, String> namespaces) throws XPathExpressionException- Throws:
XPathExpressionException
-
evalXPath
public static Object evalXPath(String xpath, InputSource source, QName type) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPath
public static Object evalXPath(String xpath, Node source, QName type) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathNode
- Throws:
XPathExpressionException
-
evalXPathNode
- Throws:
XPathExpressionException
-
evalXPathElement
public static Element evalXPathElement(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathElement
- Throws:
XPathExpressionException
-
evalXPathBoolean
public static Boolean evalXPathBoolean(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathBoolean
- Throws:
XPathExpressionException
-
evalXPathString
public static String evalXPathString(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathString
- Throws:
XPathExpressionException
-
evalXPathNodes
public static List<Node> evalXPathNodes(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathNodes
- Throws:
XPathExpressionException
-
evalXPathElements
public static List<Element> evalXPathElements(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathElements
public static List<Element> evalXPathElements(String xpath, Node source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathTextElements
public static List<String> evalXPathTextElements(String xpath, InputSource source) throws XPathExpressionException - Throws:
XPathExpressionException
-
evalXPathTextElements
public static List<String> evalXPathTextElements(String xpath, Node source) throws XPathExpressionException - Throws:
XPathExpressionException
-
toTextContent
-