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

## Class PrettyXMLStreamWriter

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.util.StreamWriterDelegate
  - - org.apache.synapse.commons.staxon.core.xml.util.PrettyXMLStreamWriter

- All Implemented Interfaces:
    javax.xml.stream.XMLStreamWriter

      public class PrettyXMLStreamWriter
      extends StreamWriterDelegate

  Pretty printing XML stream writer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrettyXMLStreamWriter(javax.xml.stream.XMLStreamWriter writer)` Create instance using default indentation (\t) and line separator (\n).
    `PrettyXMLStreamWriter(javax.xml.stream.XMLStreamWriter 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` | `setParent(javax.xml.stream.XMLStreamWriter parent)`
    `void` | `writeCData(java.lang.String data)`
    `void` | `writeCharacters(char[] text, int start, int len)`
    `void` | `writeCharacters(java.lang.String text)`
    `void` | `writeComment(java.lang.String data)`
    `void` | `writeEmptyElement(java.lang.String localName)`
    `void` | `writeEmptyElement(java.lang.String namespaceURI, java.lang.String localName)`
    `void` | `writeEmptyElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)`
    `void` | `writeEndElement()`
    `void` | `writeProcessingInstruction(java.lang.String target)`
    `void` | `writeProcessingInstruction(java.lang.String target, java.lang.String data)`
    `void` | `writeStartDocument()`
    `void` | `writeStartDocument(java.lang.String version)`
    `void` | `writeStartDocument(java.lang.String encoding, java.lang.String version)`
    `void` | `writeStartElement(java.lang.String localName)`
    `void` | `writeStartElement(java.lang.String namespaceURI, java.lang.String localName)`
    `void` | `writeStartElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)`

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

      `close, flush, getNamespaceContext, getParent, getPrefix, getProperty, setDefaultNamespace, setNamespaceContext, setPrefix, writeAttribute, writeAttribute, writeAttribute, writeDefaultNamespace, writeDTD, writeEndDocument, writeEntityRef, writeNamespace`

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

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

- - ### Constructor Detail

    - #### PrettyXMLStreamWriter

          public PrettyXMLStreamWriter(javax.xml.stream.XMLStreamWriter writer)

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

    - #### PrettyXMLStreamWriter

          public PrettyXMLStreamWriter(javax.xml.stream.XMLStreamWriter 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.XMLStreamWriter parent)

      Overrides:
        `setParent` in class `StreamWriterDelegate`

    - #### writeStartDocument

          public void writeStartDocument()
                                  throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartDocument` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeStartDocument

          public void writeStartDocument(java.lang.String version)
                                  throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartDocument` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeStartDocument

          public void writeStartDocument(java.lang.String encoding,
                                         java.lang.String version)
                                  throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartDocument` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(java.lang.String localName)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(java.lang.String namespaceURI,
                                        java.lang.String localName)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(java.lang.String prefix,
                                        java.lang.String localName,
                                        java.lang.String namespaceURI)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeStartElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(java.lang.String namespaceURI,
                                        java.lang.String localName)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(java.lang.String prefix,
                                        java.lang.String localName,
                                        java.lang.String namespaceURI)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(java.lang.String localName)
                                 throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeEndElement

          public void writeEndElement()
                               throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeEndElement` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeEndElement` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeCData

          public void writeCData(java.lang.String data)
                          throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeCData` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeCData` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeCharacters

          public void writeCharacters(java.lang.String text)
                               throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeCharacters` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeCharacters` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeCharacters

          public void writeCharacters(char[] text,
                                      int start,
                                      int len)
                               throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeCharacters` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeCharacters` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeComment

          public void writeComment(java.lang.String data)
                            throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeComment` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeComment` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeProcessingInstruction

          public void writeProcessingInstruction(java.lang.String target)
                                          throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeProcessingInstruction` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeProcessingInstruction` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### writeProcessingInstruction

          public void writeProcessingInstruction(java.lang.String target,
                                                 java.lang.String data)
                                          throws javax.xml.stream.XMLStreamException

      Specified by:
        `writeProcessingInstruction` in interface `javax.xml.stream.XMLStreamWriter`
      Overrides:
        `writeProcessingInstruction` in class `StreamWriterDelegate`
      Throws:
        `javax.xml.stream.XMLStreamException`

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