The DOM3Serializer is a facet of a serializer and is obtained from the asDOM3Serializer() method of the org.apache.xml.serializer.Serializer interface. A serializer may or may not support a level 3 DOM serializer, if it does not then the return value from asDOM3Serializer() is null.
Example:
Document doc; Serializer ser; OutputStream os; DOMErrorHandler handler; ser = ...; os = ...; handler = ...; ser.setOutputStream( os ); DOM3Serialzier dser = (DOM3Serialzier)ser.asDOM3Serializer(); dser.setErrorHandler(handler); dser.serialize(doc);
org.apache.xml.serializer.Serializer
| Modifier and Type | Method and Description |
|---|---|
| public DOMErrorHandler | Returns: A Level 3 DOMErrorHandlerReturns a DOMErrorHandler set on the DOM Level 3 Serializer. |
| public LSSerializerFilter | Returns: The Level 3 LSSerializerFilterReturns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes during serialization. |
| public void | |
| public void | setErrorHandler(DOMErrorHandler
the Level 3 DOMErrorHandler handler)Sets a DOMErrorHandler on the DOM Level 3 Serializer. |
| public void | setNewLine(String
a String that is the end-of-line character sequence to be
used in serialization. newLine)Sets the new line character to be used during serialization |
| public void | setNodeFilter(LSSerializerFilter
the Level 3 LSSerializerFilter filter)Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes during serialization. |
| getErrorHandler | back to summary |
|---|---|
| public DOMErrorHandler getErrorHandler() Returns a DOMErrorHandler set on the DOM Level 3 Serializer. This interface is a public API.
| |
| getNodeFilter | back to summary |
|---|---|
| public LSSerializerFilter getNodeFilter() Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes during serialization. This interface is a public API.
| |
| serializeDOM3 | back to summary |
|---|---|
| public void serializeDOM3(Node node) throws IOException Serializes the Level 3 DOM node. Throws an exception only if an I/O exception occured while serializing. This interface is a public API.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(DOMErrorHandler handler) Sets a DOMErrorHandler on the DOM Level 3 Serializer. This interface is a public API.
| |
| setNewLine | back to summary |
|---|---|
| public void setNewLine(String newLine) Sets the new line character to be used during serialization
| |
| setNodeFilter | back to summary |
|---|---|
| public void setNodeFilter(LSSerializerFilter filter) Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes during serialization. This interface is a public API.
| |