public class

XHTMLSerializer

extends HTMLSerializer
java.lang.Object
   ↳ org.apache.xml.serialize.BaseMarkupSerializer
     ↳ org.apache.xml.serialize.HTMLSerializer
       ↳ org.apache.xml.serialize.XHTMLSerializer

This class is deprecated.
This class was deprecated in Xerces 2.6.2. It is recommended that new applications use JAXP's Transformation API for XML (TrAX) for serializing XHTML. See the Xerces documentation for more information.

Class Overview

Implements an XHTML serializer supporting both DOM and SAX pretty serializing. For usage instructions see either Serializer or BaseMarkupSerializer.

See Also

Summary

[Expand]
Inherited Constants
From class org.apache.xml.serialize.HTMLSerializer
[Expand]
Inherited Fields
From class org.apache.xml.serialize.BaseMarkupSerializer
Public Constructors
XHTMLSerializer()
Constructs a new serializer.
XHTMLSerializer(OutputFormat format)
Constructs a new serializer.
XHTMLSerializer(Writer writer, OutputFormat format)
Constructs a new serializer that writes to the specified writer using the specified output format.
XHTMLSerializer(OutputStream output, OutputFormat format)
Constructs a new serializer that writes to the specified output stream using the specified output format.
Public Methods
void setOutputFormat(OutputFormat format)
Specifies an output format for this serializer.
[Expand]
Inherited Methods
From class org.apache.xml.serialize.HTMLSerializer
From class org.apache.xml.serialize.BaseMarkupSerializer
From class java.lang.Object
From interface org.apache.xml.serialize.DOMSerializer
From interface org.apache.xml.serialize.Serializer
From interface org.xml.sax.ContentHandler
From interface org.xml.sax.DTDHandler
From interface org.xml.sax.DocumentHandler
From interface org.xml.sax.ext.DeclHandler
From interface org.xml.sax.ext.LexicalHandler

Public Constructors

public XHTMLSerializer ()

Constructs a new serializer. The serializer cannot be used without calling setOutputCharStream(Writer) or setOutputByteStream(OutputStream) first.

public XHTMLSerializer (OutputFormat format)

Constructs a new serializer. The serializer cannot be used without calling setOutputCharStream(Writer) or setOutputByteStream(OutputStream) first.

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

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

Public Methods

public void setOutputFormat (OutputFormat format)

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