public class XMLUtil extends Object
This class exists because Android 2.1 does not offer any way to print an org.w3c.dom.Document,
and it also doesn't implement the most trivial methods to build a DOM (although the API is provided, they
fail at runtime). We might be able to remove this class once compatibility for Android 2.1 can be
dropped.
| Constructor and Description |
|---|
XMLUtil() |
public static String documentToString(Document document) throws Exception
Exceptionpublic static String documentToString(Document document, boolean standalone) throws Exception
Exceptionpublic static String documentToFragmentString(Document document) throws Exception
Exceptionprotected static String nodeToString(Node node, Set<String> parentPrefixes, String namespaceURI) throws Exception
Exceptionpublic static Element appendNewElement(Document document, Element parent, String element)
public static Element appendNewElementIfNotNull(Document document, Element parent, Enum el, Object content)
public static Element appendNewElementIfNotNull(Document document, Element parent, Enum el, Object content, String namespace)
public static Element appendNewElementIfNotNull(Document document, Element parent, String element, Object content)
public static Element appendNewElementIfNotNull(Document document, Element parent, String element, Object content, String namespace)
public static Element appendNewElement(Document document, Element parent, String element, Object content)
public static Element appendNewElement(Document document, Element parent, String element, Object content, String namespace)
Copyright © 2023 jUPnP.org. All rights reserved.