org.apache.xml.serialize

Class XHTMLSerializer

Implemented Interfaces:
ContentHandler, DeclHandler, DocumentHandler, DTDHandler, LexicalHandler, DOMSerializer, Serializer

public class XHTMLSerializer
extends HTMLSerializer

Implements an XHTML serializer supporting both DOM and SAX pretty serializing. For usage instructions see either Serializer or BaseMarkupSerializer.
Version:
$Revision: 447253 $ $Date: 2006-09-18 01:32:50 -0400 (Mon, 18 Sep 2006) $
Author:
Assaf Arkin
See Also:
Serializer

Field Summary

Fields inherited from class org.apache.xml.serialize.HTMLSerializer

XHTMLNamespace

Fields inherited from class org.apache.xml.serialize.BaseMarkupSerializer

_docTypePublicId, _docTypeSystemId, _encodingInfo, _format, _indenting, _prefixes, _printer, _started, fCurrentNode, fDOMError, fDOMErrorHandler, fDOMFilter, fStrBuffer, features

Constructor Summary

XHTMLSerializer()
Constructs a new serializer.
XHTMLSerializer(OutputStream output, OutputFormat format)
Constructs a new serializer that writes to the specified output stream using the specified output format.
XHTMLSerializer(Writer writer, OutputFormat format)
Constructs a new serializer that writes to the specified writer using the specified output format.
XHTMLSerializer(OutputFormat format)
Constructs a new serializer.

Method Summary

void
setOutputFormat(OutputFormat format)

Methods inherited from class org.apache.xml.serialize.HTMLSerializer

characters, characters, endElement, endElement, endElementIO, escapeURI, getEntityRef, serializeElement, setOutputFormat, setXHTMLNamespace, startDocument, startElement, startElement

Methods inherited from class org.apache.xml.serialize.BaseMarkupSerializer

asContentHandler, asDOMSerializer, asDocumentHandler, attributeDecl, characters, characters, checkUnboundNamespacePrefixedNode, comment, comment, content, elementDecl, endCDATA, endDTD, endDocument, endEntity, endNonEscaping, endPrefixMapping, endPreserving, enterElementState, externalEntityDecl, fatalError, getElementState, getEntityRef, getPrefix, ignorableWhitespace, internalEntityDecl, isDocumentState, leaveElementState, modifyDOMError, notationDecl, prepare, printCDATAText, printDoctypeURL, printEscaped, printEscaped, printText, printText, processingInstruction, processingInstructionIO, reset, serialize, serialize, serialize, serializeElement, serializeNode, serializePreRoot, setDocumentLocator, setOutputByteStream, setOutputCharStream, setOutputFormat, skippedEntity, startCDATA, startDTD, startDocument, startEntity, startNonEscaping, startPrefixMapping, startPreserving, surrogates, unparsedEntityDecl

Constructor Details

XHTMLSerializer

public XHTMLSerializer()
Constructs a new serializer. The serializer cannot be used without calling XHTMLSerializer or XHTMLSerializer first.

XHTMLSerializer

public XHTMLSerializer(OutputStream output,
                       OutputFormat format)
Constructs a new serializer that writes to the specified output stream using the specified output format. If format is null, will use a default output format.
Parameters:
output - The output stream to use
format - The output format to use, null for the default

XHTMLSerializer

public XHTMLSerializer(Writer writer,
                       OutputFormat format)
Constructs a new serializer that writes to the specified writer using the specified output format. If format is null, will use a default output format.
Parameters:
writer - The writer to use
format - The output format to use, null for the default

XHTMLSerializer

public XHTMLSerializer(OutputFormat format)
Constructs a new serializer. The serializer cannot be used without calling XHTMLSerializer or XHTMLSerializer first.

Method Details

setOutputFormat

public void setOutputFormat(OutputFormat format)
Specified by:
setOutputFormat in interface Serializer
Overrides:
setOutputFormat in interface HTMLSerializer

Copyright B) 1999-2007 The Apache Software Foundation. All Rights Reserved.