public final class XmlUtils extends Object
XmlUtils contains XML helper methods.| Modifier and Type | Method | Description |
|---|---|---|
static List<Element> |
findElements(ValidationContext context,
Element element,
String path) |
Search for Element based on XPath and current Validation Context.
|
static List<Element> |
findElementsWithoutAncestors(ValidationContext context,
Element element,
String path) |
Search for Element based on XPath and current Validation Context.
|
static Object |
getChildObjectValue(ValidationContext context,
Node node,
String path,
QName type) |
Get the value of a child object based on XPath, current Node and current Validation Context.
|
static List<Element> |
getElements(NodeList list) |
convert NodeList to List<Element>.
|
static NodeList |
getNodeList(ValidationContext context,
Element element,
String path) |
Returns the node list based on XPath and current Validation Context.
|
static NodeList |
getNodeListWithoutAncestors(ValidationContext context,
Element element,
String path) |
Returns the node list based on XPath and current Validation Context.
|
static Object |
getObjectValue(ValidationContext context,
Node node,
String path,
QName type) |
Get the value of an object based on XPath, current Node and current Validation Context.
|
public static List<Element> getElements(NodeList list)
list - NodeList to convert.public static List<Element> findElements(ValidationContext context, Element element, String path) throws XPathExpressionException
context - The Validation Context (containing the XPath).element - The current Element for the search.path - The XPath from current element.XPathExpressionException - the x path expression exception.public static List<Element> findElementsWithoutAncestors(ValidationContext context, Element element, String path) throws XPathExpressionException
context - The Validation Context (containing the XPath).element - The current Element for the search.path - The XPath from current element.XPathExpressionException - the x path expression exception.public static NodeList getNodeList(ValidationContext context, Element element, String path) throws XPathExpressionException
context - The Validation Context (containing the XPath).element - The current Element for the search.path - The XPath from current element.XPathExpressionException - the x path expression exception.public static NodeList getNodeListWithoutAncestors(ValidationContext context, Element element, String path) throws XPathExpressionException
context - The Validation Context (containing the XPath).element - The current Element for the search.path - The XPath from current element.XPathExpressionException - the x path expression exception.public static Object getObjectValue(ValidationContext context, Node node, String path, QName type)
context - The Validation Context (containing the XPath).node - The current node.path - The current path.type - The type.public static Object getChildObjectValue(ValidationContext context, Node node, String path, QName type)
context - The Validation Context (containing the XPath).node - The current node.path - The current path.type - The type.Copyright © 2025. All rights reserved.