Class XMLExtUtils
- java.lang.Object
-
- com.tivoli.am.fim.trustserver.sts.utilities.XMLExtUtils
-
public class XMLExtUtils extends java.lang.ObjectUtility class that can be used to perform an XPath evaluation on an XML Document or Element to retrieve a matching Node or NodeList.
-
-
Constructor Summary
Constructors Constructor Description XMLExtUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.NodegetNode(java.lang.String xpath, org.w3c.dom.Document doc)Method evaluates an xpath expression on the given XML Document and returns the matched node.static org.w3c.dom.NodegetNode(java.lang.String xpath, org.w3c.dom.Element elem)Method evaluates an xpath expression on the given XML Element and returns the matched node.static org.w3c.dom.NodeListgetNodes(java.lang.String xpath, org.w3c.dom.Document doc)Method evaluates an xpath expression on the given XML Document and returns a list of matched nodes.static org.w3c.dom.NodeListgetNodes(java.lang.String xpath, org.w3c.dom.Element elem)Method evaluates an xpath expression on the given XML Element and returns a list of matched nodes.
-
-
-
Method Detail
-
getNode
public static org.w3c.dom.Node getNode(java.lang.String xpath, org.w3c.dom.Element elem)Method evaluates an xpath expression on the given XML Element and returns the matched node.- Parameters:
xpath- XPath expression used to find the Nodes.elem- XML Element object to query- Returns:
- Node. If an exception is encountered, return null.
-
getNode
public static org.w3c.dom.Node getNode(java.lang.String xpath, org.w3c.dom.Document doc)Method evaluates an xpath expression on the given XML Document and returns the matched node.- Parameters:
xpath- XPath expression used to find the Nodes.doc- XML Document object to query- Returns:
- Node. If an exception is encountered, return null.
-
getNodes
public static org.w3c.dom.NodeList getNodes(java.lang.String xpath, org.w3c.dom.Element elem)Method evaluates an xpath expression on the given XML Element and returns a list of matched nodes.- Parameters:
xpath- XPath expression used to find the Nodes.elem- XML Element object to query- Returns:
- NodeList. If an exception is encountered, return null.
-
getNodes
public static org.w3c.dom.NodeList getNodes(java.lang.String xpath, org.w3c.dom.Document doc)Method evaluates an xpath expression on the given XML Document and returns a list of matched nodes.- Parameters:
xpath- XPath expression used to find the Nodes.doc- XML Document object to query- Returns:
- NodeList. If an exception is encountered, return null.
-
-