Google

Xerces 3.1.1 API: Interface Serializer
Xerces 3.1.1


Interface Serializer


public interface Serializer

Interface for a DOM serializer implementation, factory for DOM and SAX serializers, and static methods for serializing DOM documents.

To serialize a document using SAX events, create a compatible serializer may also be used as DTDHandler, DeclHandler and LexicalHandler.

To serialize a DOM document or DOM element, create a compatible serializer using #makeSerializer and call it's #serialize(Document) or #serialize(Element) methods. Both methods would produce a full XML document, to serizlie only and specify no document type.

The convenience method #serialize(Document,Writer,OutputFormat) creates a serializer and calls #serizlie(Document) on that serialized.

to serialize the document based on the specified method. If the output format or method are missing, the default is an XML serializer with UTF-8 encoding and now indentation.

Version:
$Revision: 1.9 $ $Date: 2000/08/30 18:59:21 $


          Specifies an output stream to which the document should be serialized.
          Specifies a writer to which the document should be serialized.
          Specifies an output format for this serializer.
Method Summary



 void
 void
 void
 

Method Detail

setOutputByteStream

public void setOutputByteStream(java.io.OutputStream output)
Specifies an output stream to which the document should be serialized. This method should not be called while the serializer is in the process of serializing a document.

setOutputCharStream

public void setOutputCharStream(java.io.Writer output)
Specifies a writer to which the document should be serialized. This method should not be called while the serializer is in the process of serializing a document.

setOutputFormat
Specifies an output format for this serializer. It the serializer has already been associated with an output format, it will switch to the new format. This method should not be called while the serializer is in the process of serializing a document.
Parameters:
format - The output format to use

asDocumentHandler

                                  throws java.io.IOException
interface, it should return null.

asContentHandler

                                throws java.io.IOException
interface, it should return null.

asDOMSerializer

                              throws java.io.IOException
interface, it should return null.

Xerces 3.1.1