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
using
Serializer.makeSAXSerializer and pass it around as a
DocumentHandler . If an I/O error occurs while serializing, it will
be thrown by
DocumentHandler.endDocument . The SAX serializer
may also be used as
DTDHandler ,
DeclHandler and
LexicalHandler .
To serialize a DOM document or DOM element, create a compatible
serializer using
Serializer.makeSerializer and call it's
Serializer.serialize(Document) or
Serializer.serialize(Element) methods.
Both methods would produce a full XML document, to serizlie only
the portion of the document use
OutputFormat.setOmitXMLDeclaration and specify no document type.
The convenience method
Serializer.serialize(Document,Writer,OutputFormat) creates a serializer and calls
Serializer.serizlie(Document) on that
serialized.
The
OutputFormat dictates what underlying serialized is used
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 $ author: Assaf Arkin author: Scott Boag See Also: DocumentHandler See Also: ContentHandler See Also: OutputFormat See Also: DOMSerializer |