Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.apache.xml.serialize
Interface Serializer

All Known Implementing Classes:
  BaseMarkupSerializer, HTMLSerializer, TextSerializer, XHTMLSerializer, XMLSerializer

Deprecated. 9.2.0.0 Replaced by org.apache.xml.serialize.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 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 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(boolean)` 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.

See Also:
  `DocumentHandler`, `ContentHandler`, `OutputFormat`, `DOMSerializer`

Method Summary
`ContentHandler` | `asContentHandler()` Deprecated. Return a `ContentHandler` interface into this serializer.
`DocumentHandler` | `asDocumentHandler()` Deprecated. Return a `DocumentHandler` interface into this serializer.
`DOMSerializer` | `asDOMSerializer()` Deprecated. Return a `DOMSerializer` interface into this serializer.
`void` | `setOutputByteStream(OutputStream output)` Deprecated. Specifies an output stream to which the document should be serialized.
`void` | `setOutputCharStream(Writer output)` Deprecated. Specifies a writer to which the document should be serialized.
`void` | `setOutputFormat(OutputFormat format)` Deprecated. Specifies an output format for this serializer.

Method Detail

### setOutputByteStream

    void setOutputByteStream(OutputStream output)

  Deprecated.
  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

    void setOutputCharStream(Writer output)

  Deprecated.
  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

    void setOutputFormat(OutputFormat format)

  Deprecated.
  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

    DocumentHandler asDocumentHandler()
                                      throws IOException

  Deprecated.
  Return a `DocumentHandler` interface into this serializer. If the serializer does not support the `DocumentHandler` interface, it should return null.

  Throws:
    `IOException`

### asContentHandler

    ContentHandler asContentHandler()
                                    throws IOException

  Deprecated.
  Return a `ContentHandler` interface into this serializer. If the serializer does not support the `ContentHandler` interface, it should return null.

  Throws:
    `IOException`

### asDOMSerializer

    DOMSerializer asDOMSerializer()
                                  throws IOException

  Deprecated.
  Return a `DOMSerializer` interface into this serializer. If the serializer does not support the `DOMSerializer` interface, it should return null.

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD