org.apache.xml.serializer.dom3

## Class DOM3SerializerImpl

- java.lang.Object
- - org.apache.xml.serializer.dom3.DOM3SerializerImpl

- All Implemented Interfaces:
    DOM3Serializer

      public final class DOM3SerializerImpl
      extends java.lang.Object
      implements DOM3Serializer

  This class implements the DOM3Serializer interface.
  Usage:
    **For internal use only**

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DOM3SerializerImpl(SerializationHandler handler)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.w3c.dom.DOMErrorHandler` | `getErrorHandler()` Returns a DOMErrorHandler set on the DOM Level 3 Serializer.
    `char[]` | `getNewLine()` Gets the end-of-line sequence of characters to be used during serialization.
    `org.w3c.dom.ls.LSSerializerFilter` | `getNodeFilter()` Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes during serialization.
    `void` | `serializeDOM3(org.w3c.dom.Node node)` Serializes the Level 3 DOM node by creating an instance of DOM3TreeWalker which traverses the DOM tree and invokes handler events to serialize the DOM NOde.
    `void` | `setErrorHandler(org.w3c.dom.DOMErrorHandler handler)` Sets a DOMErrorHandler on the DOM Level 3 Serializer.
    `void` | `setNewLine(char[] newLine)` Sets the end-of-line sequence of characters to be used during serialization.
    `void` | `setNodeFilter(org.w3c.dom.ls.LSSerializerFilter filter)` Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes during serialization.
    `void` | `setSerializationHandler(SerializationHandler handler)` Sets a SerializationHandler on the DOM Serializer.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DOM3SerializerImpl

          public DOM3SerializerImpl(SerializationHandler handler)

      Constructor
      Parameters:
        `handler` - An instance of the SerializationHandler interface.

  - ### Method Detail

    - #### getErrorHandler

          public org.w3c.dom.DOMErrorHandler getErrorHandler()

      Returns a DOMErrorHandler set on the DOM Level 3 Serializer. This interface is a public API.
      Specified by:
        `getErrorHandler` in interface `DOM3Serializer`
      Returns:
        A Level 3 DOMErrorHandler

    - #### getNodeFilter

          public org.w3c.dom.ls.LSSerializerFilter getNodeFilter()

      Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes during serialization. This interface is a public API.
      Specified by:
        `getNodeFilter` in interface `DOM3Serializer`
      Returns:
        The Level 3 LSSerializerFilter

    - #### getNewLine

          public char[] getNewLine()

      Gets the end-of-line sequence of characters to be used during serialization.

    - #### serializeDOM3

          public void serializeDOM3(org.w3c.dom.Node node)
                             throws java.io.IOException

      Serializes the Level 3 DOM node by creating an instance of DOM3TreeWalker which traverses the DOM tree and invokes handler events to serialize the DOM NOde. Throws an exception only if an I/O exception occured while serializing. This interface is a public API.
      Specified by:
        `serializeDOM3` in interface `DOM3Serializer`
      Parameters:
        `node` - the Level 3 DOM node to serialize
      Throws:
        `java.io.IOException` - if an I/O exception occured while serializing

    - #### setErrorHandler

          public void setErrorHandler(org.w3c.dom.DOMErrorHandler handler)

      Sets a DOMErrorHandler on the DOM Level 3 Serializer. This interface is a public API.
      Specified by:
        `setErrorHandler` in interface `DOM3Serializer`
      Parameters:
        `handler` - the Level 3 DOMErrorHandler

    - #### setNodeFilter

          public void setNodeFilter(org.w3c.dom.ls.LSSerializerFilter filter)

      Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes during serialization. This interface is a public API.
      Specified by:
        `setNodeFilter` in interface `DOM3Serializer`
      Parameters:
        `filter` - the Level 3 LSSerializerFilter

    - #### setSerializationHandler

          public void setSerializationHandler(SerializationHandler handler)

      Sets a SerializationHandler on the DOM Serializer. This interface is a public API.
      Parameters:
        `handler` - An instance of SerializationHandler

    - #### setNewLine

          public void setNewLine(char[] newLine)

      Sets the end-of-line sequence of characters to be used during serialization.
      Specified by:
        `setNewLine` in interface `DOM3Serializer`
      Parameters:
        `newLine` - The end-of-line sequence of characters to be used during serialization.

Copyright © 2023 Apache XML Project. All Rights Reserved.