| 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
and pass it around as a
org.xml.sax.DocumentHandler . If an I/O error occurs while serializing, it will
be thrown by
DocumentHandler.endDocument . The SAX serializer
may also be used as
org.xml.sax.DTDHandler ,
org.xml.sax.ext.DeclHandler and
org.xml.sax.ext.LexicalHandler .
To serialize a DOM document or DOM element, create a compatible
serializer and call it's
DOMSerializer.serialize(Document) or
DOMSerializer.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
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: 36559 $ $Date: 2006-04-28 11:38:13 -0700 (Fri, 28 Apr 2006) $ author: Assaf Arkin author: Scott Boag See Also: DocumentHandler See Also: ContentHandler See Also: OutputFormat See Also: DOMSerializer |