public class XML extends Object
| Constructor and Description |
|---|
XML() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
createDocument()
Creates a new XML document.
|
static byte[] |
transformToByteArray(Document document)
Transforms the DOM XML document into a byte array.
|
static Document |
transformToDocument(byte[] data)
Transforms the byte array into a DOM XML document.
|
static Document |
transformToDocument(InputSource inputSource)
Transforms the inout source into a DOM XML document.
|
static Document |
transformToDocument(InputStream inputStream)
Transforms the input stream into a DOM XML document.
|
static Document |
transformToDocument(Reader inputReader)
Transforms the reader into a DOM XML document.
|
static void |
writeToOutputStream(Document document,
Writer writer)
Writes the given document to the given writer.
|
static void |
writeToOutputStream(Document document,
Writer writer,
boolean preamble)
Writes the given document to the given writer.
|
public static Document createDocument()
public static byte[] transformToByteArray(Document document)
document - The document to transformpublic static void writeToOutputStream(Document document, Writer writer)
document - The document to writewriter - The writer to write the document topublic static void writeToOutputStream(Document document, Writer writer, boolean preamble)
document - The document to writewriter - The writer to write the document topreamble - true to include the XML header,
false to not include itpublic static Document transformToDocument(byte[] data)
data - The byte array to parsepublic static Document transformToDocument(InputStream inputStream)
inputStream - The input stream to parsepublic static Document transformToDocument(Reader inputReader)
inputReader - The reader to read the XML frompublic static Document transformToDocument(InputSource inputSource)
inputSource - The source to read the XML fromCopyright © 2026. All rights reserved.