public class XML extends Object
| Constructor and Description |
|---|
XML() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendChildAcrossDocuments(Element parent,
Node child)
Cross-document appendChild.
|
static Document |
getXml(InputStream in)
Parse an InputStream as DOM, with "utf-8" as default encoding.
|
static Document |
getXml(InputStream in,
String encoding)
Parse an InputStream as DOM.
|
static Document |
getXml(String xml)
Parse an XML string as DOM, with "utf-8" as default encoding.
|
static Document |
getXml(String xml,
String encoding)
Parse an XML string as DOM.
|
static String |
toString(Node xml)
Serialize an XML node as a string.
|
static String |
toString(Node xml,
Map<String,String> outputProps) |
public static Document getXml(String xml, String encoding)
xml - The serialized XMLencoding - the encoding to usepublic static Document getXml(String xml)
xml - The serialized XML to parsepublic static Document getXml(InputStream in)
in - The InputStream to parsepublic static Document getXml(InputStream in, String encoding)
in - The InputStream to parseencoding - The encoding to use while parsingpublic static String toString(Node xml)
xml - The XML to serializeCopyright © 2012–2022 The DAISY Consortium. All rights reserved.