org.apache.synapse.commons.staxon.core.xml.util

## Class PrettyXMLEventWriter

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.util.EventWriterDelegate
  - - org.apache.synapse.commons.staxon.core.xml.util.PrettyXMLEventWriter

- All Implemented Interfaces:
    javax.xml.stream.util.XMLEventConsumer, javax.xml.stream.XMLEventWriter

      public class PrettyXMLEventWriter
      extends EventWriterDelegate

  Pretty printing XML event writer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrettyXMLEventWriter(javax.xml.stream.XMLEventWriter writer)` Create instance using default indentation (\t) and line separator (\n).
    `PrettyXMLEventWriter(javax.xml.stream.XMLEventWriter writer, java.lang.String indentation, java.lang.String newline)` Create instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(javax.xml.stream.events.XMLEvent event)`
    `void` | `add(javax.xml.stream.XMLEventReader reader)`
    `void` | `setParent(javax.xml.stream.XMLEventWriter parent)`

    - ### Methods inherited from class org.apache.synapse.commons.staxon.core.util.EventWriterDelegate

      `close, flush, getNamespaceContext, getParent, getPrefix, setDefaultNamespace, setNamespaceContext, setPrefix`

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

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

- - ### Constructor Detail

    - #### PrettyXMLEventWriter

          public PrettyXMLEventWriter(javax.xml.stream.XMLEventWriter writer)

      Create instance using default indentation (\t) and line separator (\n).
      Parameters:
        `writer` - parent writer

    - #### PrettyXMLEventWriter

          public PrettyXMLEventWriter(javax.xml.stream.XMLEventWriter writer,
                                      java.lang.String indentation,
                                      java.lang.String newline)

      Create instance.
      Parameters:
        `writer` - parent writer
        `indentation` - line indentation
        `newline` - line separator

  - ### Method Detail

    - #### setParent

          public void setParent(javax.xml.stream.XMLEventWriter parent)

      Overrides:
        `setParent` in class `EventWriterDelegate`

    - #### add

          public void add(javax.xml.stream.XMLEventReader reader)
                   throws javax.xml.stream.XMLStreamException

      Specified by:
        `add` in interface `javax.xml.stream.XMLEventWriter`
      Overrides:
        `add` in class `EventWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### add

          public void add(javax.xml.stream.events.XMLEvent event)
                   throws javax.xml.stream.XMLStreamException

      Specified by:
        `add` in interface `javax.xml.stream.util.XMLEventConsumer`
      Specified by:
        `add` in interface `javax.xml.stream.XMLEventWriter`
      Overrides:
        `add` in class `EventWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.