Package com.github.hypfvieh
Class XmlHelper
java.lang.Object
com.github.hypfvieh.XmlHelper
Utility for various XML operations.
- Author:
- hypfvieh
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeListapplyXpathExpressionToDocument(String _xpathExpression, Node _xmlDocumentOrNode) Use an Xpath expression on the given node or document.static DocumentparseXmlString(String _xmlStr) Create a newDocumentinstance from the given string, disabling validation.
-
Method Details
-
parseXmlString
Create a newDocumentinstance from the given string, disabling validation.- Parameters:
_xmlStr- xml string- Returns:
- document, never null
- Throws:
IOException- on error
-
applyXpathExpressionToDocument
public static NodeList applyXpathExpressionToDocument(String _xpathExpression, Node _xmlDocumentOrNode) throws IOException Use an Xpath expression on the given node or document.- Parameters:
_xpathExpression- xpath expression string_xmlDocumentOrNode- aDocumentorNodeobject- Returns:
- NodeList never null
- Throws:
IOException- on error
-