java.lang.Object
org.freedesktop.dbus.utils.XmlUtil
Assorted static XML utility methods.
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic NodeList
applyXpathExpressionToDocument
(String _xpathExpression, Node _xmlDocumentOrNode) Applys a xpathExpression to a xml-Document and return aNodeList
with the results.convertToAttributeMap
(NamedNodeMap _nodeMap) ConvertsNamedNodeMap
to aLinkedHashMap
<String,String>.convertToElementList
(NodeList _nodeList) static boolean
isElementType
(Node _node) Shortcut for checking if given node is of typeElement
.static Document
parseXmlString
(String _xmlStr, boolean _validating, boolean _namespaceAware) Read the given string as XML document.static Element
-
Methodendetails
-
isElementType
Shortcut for checking if given node is of typeElement
.- Parameter:
_node
- node- Gibt zurück:
- true if
Element
, false otherwise
-
toElement
-
applyXpathExpressionToDocument
public static NodeList applyXpathExpressionToDocument(String _xpathExpression, Node _xmlDocumentOrNode) throws IOException Applys a xpathExpression to a xml-Document and return aNodeList
with the results.- Parameter:
_xpathExpression
- xpath expression_xmlDocumentOrNode
- document or node- Gibt zurück:
NodeList
- Löst aus:
IOException
- on error
-
parseXmlString
public static Document parseXmlString(String _xmlStr, boolean _validating, boolean _namespaceAware) throws IOException Read the given string as XML document.- Parameter:
_xmlStr
- xml string_validating
- boolean_namespaceAware
- boolean- Gibt zurück:
Document
- Löst aus:
IOException
- on error
-
convertToElementList
- Parameter:
_nodeList
- collection of nodes- Gibt zurück:
- list of elements
-
convertToAttributeMap
ConvertsNamedNodeMap
to aLinkedHashMap
<String,String>.- Parameter:
_nodeMap
- node map- Gibt zurück:
LinkedHashMap
, maybe empty but never null
-