public final class XML
extends java.lang.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 org.w3c.dom.Document |
fromInputSource(org.xml.sax.InputSource source)
Parses the input source as DOM.
|
static org.w3c.dom.Document |
fromInputStream(java.io.InputStream in,
java.lang.String encoding)
Parses an InputStream as DOM.
|
static org.w3c.dom.Document |
fromString(java.lang.String xml)
Parses an XML string as DOM.
|
static akka.util.ByteString |
toBytes(org.w3c.dom.Document document)
Converts the document to bytes.
|
public static org.w3c.dom.Document fromString(java.lang.String xml)
xml
- the input XML stringpublic static org.w3c.dom.Document fromInputStream(java.io.InputStream in, java.lang.String encoding)
in
- the inputstream to parse.encoding
- the encoding of the input stream, if not null.public static org.w3c.dom.Document fromInputSource(org.xml.sax.InputSource source)
source
- The source to parse.public static akka.util.ByteString toBytes(org.w3c.dom.Document document)
document
- The document to convert.