Class XmlUtil
java.lang.Object
org.freedesktop.dbus.utils.XmlUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeListapplyXpathExpressionToDocument(String _xpathExpression, Node _xmlDocumentOrNode) Applys a xpathExpression to a xml-Document and return aNodeListwith the results.convertToAttributeMap(NamedNodeMap _nodeMap) ConvertsNamedNodeMapto aLinkedHashMap<String,String>.convertToElementList(NodeList _nodeList) static booleanisElementType(Node _node) Shortcut for checking if given node is of typeElement.static DocumentparseXmlString(String _xmlStr, boolean _validating, boolean _namespaceAware) Read the given string as XML document.static Element
-
Method Details
-
isElementType
-
toElement
-
applyXpathExpressionToDocument
public static NodeList applyXpathExpressionToDocument(String _xpathExpression, Node _xmlDocumentOrNode) throws IOException Applys a xpathExpression to a xml-Document and return aNodeListwith the results.- Parameters:
_xpathExpression- xpath expression_xmlDocumentOrNode- document or node- Returns:
NodeList- Throws:
IOException- on error
-
parseXmlString
public static Document parseXmlString(String _xmlStr, boolean _validating, boolean _namespaceAware) throws IOException Read the given string as XML document.- Parameters:
_xmlStr- xml string_validating- boolean_namespaceAware- boolean- Returns:
Document- Throws:
IOException- on error
-
convertToElementList
-
convertToAttributeMap
ConvertsNamedNodeMapto aLinkedHashMap<String,String>.- Parameters:
_nodeMap- node map- Returns:
LinkedHashMap, maybe empty but never null
-