Package 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:
  `XMLEventConsumer`, `XMLEventWriter`

public class PrettyXMLEventWriter extends EventWriterDelegate
Pretty printing XML event writer.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(XMLEvent event)`
  `void`
  `add(XMLEventReader reader)`
  `void`
  `setParent(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 Details

  - ### PrettyXMLEventWriter

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

  - ### PrettyXMLEventWriter

    public PrettyXMLEventWriter(XMLEventWriter writer, String indentation, String newline)
    Create instance.
    Parameters:
      `writer` - parent writer
      `indentation` - line indentation
      `newline` - line separator

- ## Method Details

  - ### setParent

    public void setParent(XMLEventWriter parent)
    Overrides:
      `setParent` in class `EventWriterDelegate`

  - ### add

    public void add(XMLEventReader reader) throws XMLStreamException
    Specified by:
      `add` in interface `XMLEventWriter`
    Overrides:
      `add` in class `EventWriterDelegate`
    Throws:
      `XMLStreamException`

  - ### add

    public void add(XMLEvent event) throws XMLStreamException
    Specified by:
      `add` in interface `XMLEventConsumer`
    Specified by:
      `add` in interface `XMLEventWriter`
    Overrides:
      `add` in class `EventWriterDelegate`
    Throws:
      `XMLStreamException`