The DOMSerializer is a facet of a serializer and is obtained from the asDOMSerializer() method of the Serializer interface. A serializer may or may not support a DOM serializer, if it does not then the return value from asDOMSerializer() is null.
Example:
Document doc; Serializer ser; OutputStream os; ser = ...; os = ...; ser.setOutputStream( os ); DOMSerialzier dser = ser.asDOMSerializer(); dser.serialize(doc);
Serializer
Modifier and Type | Method and Description |
---|---|
public void |
serialize | back to summary |
---|---|
public void serialize(Node node) throws IOException Serializes the DOM node. Throws an exception only if an I/O exception occured while serializing. This interface is a public API.
|