public final class XMLUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
XML_NS |
static String |
XMLNS_NS |
| Modifier and Type | Method and Description |
|---|---|
static void |
ElementToStream(Element element,
OutputStream out) |
static Element |
getDirectChildElement(Node parentNode,
String localName,
String namespace)
Gets a direct child with specified localname and namespace.
|
static InputSource |
getInputSourceFromURI(String uri)
Utility to get the bytes uri.
|
static String |
getNamespace(String prefix,
Node e) |
static String |
PrettyDocumentToString(Document doc) |
static InputSource |
sourceToInputSource(Source source)
Utility to get the bytes uri
|
public static final String XMLNS_NS
public static final String XML_NS
public static Element getDirectChildElement(Node parentNode, String localName, String namespace)
parentNode - the node where to start the searchlocalName - local name of the child to getnamespace - the namespace of the child to getnull if not such node foundpublic static String PrettyDocumentToString(Document doc) throws TransformerException
TransformerExceptionpublic static void ElementToStream(Element element, OutputStream out) throws TransformerException
TransformerExceptionpublic static InputSource sourceToInputSource(Source source) throws TransformerException
source - the resource to getTransformerExceptionpublic static InputSource getInputSourceFromURI(String uri)
uri - the resource to getCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.