public abstract class DOMSerializer extends Object
Constructor and Description |
---|
DOMSerializer() |
Modifier and Type | Method and Description |
---|---|
static DOMSerializer |
createNew() |
static DOMSerializer |
createNew(DOMSerializerOptions options) |
protected static Transformer |
createTransformer(DOMSerializerOptions options)
Creates a new copy Transformer.
|
static Document |
removeIndentTextNodes(Document document)
Removes the indent text nodes from the dom tree.
|
void |
serialize(Document document,
OutputStream out)
Serializes the document to the output stream.
|
void |
serialize(Document document,
Writer out)
Serializes the xml document to the writer.
|
abstract void |
serialize(Node node,
OutputStream out)
Serializes the node to the output stream.
|
abstract void |
serialize(Node node,
Writer out)
Serializes the xml node to the writer.
|
byte[] |
serializeToBytes(Document document)
Converts the document to a byte[].
|
byte[] |
serializeToBytes(Node node)
Converts the node to a byte[].
|
String |
serializeToString(Document document)
Converts the document to a String.
|
String |
serializeToString(Node node)
Converts the node to a String.
|
public static DOMSerializer createNew()
public static DOMSerializer createNew(DOMSerializerOptions options)
protected static Transformer createTransformer(DOMSerializerOptions options) throws DOMSerializerException
options
- the options.DOMSerializerException
- if the copy transformer can't be created.public static Document removeIndentTextNodes(Document document)
document
- the document.public void serialize(Document document, Writer out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public void serialize(Document document, OutputStream out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(Document document) throws DOMSerializerException
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(Node node) throws DOMSerializerException
DOMSerializerException
- if error occurs.public abstract void serialize(Node node, OutputStream out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public String serializeToString(Document document) throws DOMSerializerException
DOMSerializerException
- if error occurs.public String serializeToString(Node node) throws DOMSerializerException
DOMSerializerException
- if error occurs.public abstract void serialize(Node node, Writer out) throws DOMSerializerException
DOMSerializerException
- if error occurs.Copyright © 2004–2016 52north.org. All rights reserved.