public final class XML extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XML.Constants
Includes the SAX prefixes from 'com.sun.org.apache.xerces.internal.impl.Constants' since they
will likely be internal in JDK9
|
| Constructor and Description |
|---|
XML() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
fromInputSource(InputSource source)
Parses the input source as DOM.
|
static Document |
fromInputStream(InputStream in,
String encoding)
Parses an InputStream as DOM.
|
static Document |
fromString(String xml)
Parses an XML string as DOM.
|
static akka.util.ByteString |
toBytes(Document document)
Converts the document to bytes.
|
public static Document fromString(String xml)
xml - the input XML stringpublic static Document fromInputStream(InputStream in, String encoding)
in - the inputstream to parse.encoding - the encoding of the input stream, if not null.public static Document fromInputSource(InputSource source)
source - The source to parse.public static akka.util.ByteString toBytes(Document document)
document - The document to convert.