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:
    XMLStreamWriter

      public class PrettyXMLStreamWriter
      extends StreamWriterDelegate

  Pretty printing XML stream writer.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setParent(XMLStreamWriter parent)`
    `void` | `writeCData(String data)`
    `void` | `writeCharacters(char[] text, int start, int len)`
    `void` | `writeCharacters(String text)`
    `void` | `writeComment(String data)`
    `void` | `writeEmptyElement(String localName)`
    `void` | `writeEmptyElement(String namespaceURI, String localName)`
    `void` | `writeEmptyElement(String prefix, String localName, String namespaceURI)`
    `void` | `writeEndElement()`
    `void` | `writeProcessingInstruction(String target)`
    `void` | `writeProcessingInstruction(String target, String data)`
    `void` | `writeStartDocument()`
    `void` | `writeStartDocument(String version)`
    `void` | `writeStartDocument(String encoding, String version)`
    `void` | `writeStartElement(String localName)`
    `void` | `writeStartElement(String namespaceURI, String localName)`
    `void` | `writeStartElement(String prefix, String localName, 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(XMLStreamWriter writer)

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

    - #### PrettyXMLStreamWriter

          public PrettyXMLStreamWriter(XMLStreamWriter writer,
                                       String indentation,
                                       String newline)

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

  - ### Method Detail

    - #### setParent

          public void setParent(XMLStreamWriter parent)

      Overrides:
        `setParent` in class `StreamWriterDelegate`

    - #### writeStartDocument

          public void writeStartDocument()
                                  throws XMLStreamException

      Specified by:
        `writeStartDocument` in interface `XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeStartDocument

          public void writeStartDocument(String version)
                                  throws XMLStreamException

      Specified by:
        `writeStartDocument` in interface `XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeStartDocument

          public void writeStartDocument(String encoding,
                                         String version)
                                  throws XMLStreamException

      Specified by:
        `writeStartDocument` in interface `XMLStreamWriter`
      Overrides:
        `writeStartDocument` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(String localName)
                                 throws XMLStreamException

      Specified by:
        `writeStartElement` in interface `XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(String namespaceURI,
                                        String localName)
                                 throws XMLStreamException

      Specified by:
        `writeStartElement` in interface `XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeStartElement

          public void writeStartElement(String prefix,
                                        String localName,
                                        String namespaceURI)
                                 throws XMLStreamException

      Specified by:
        `writeStartElement` in interface `XMLStreamWriter`
      Overrides:
        `writeStartElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(String namespaceURI,
                                        String localName)
                                 throws XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(String prefix,
                                        String localName,
                                        String namespaceURI)
                                 throws XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeEmptyElement

          public void writeEmptyElement(String localName)
                                 throws XMLStreamException

      Specified by:
        `writeEmptyElement` in interface `XMLStreamWriter`
      Overrides:
        `writeEmptyElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeEndElement

          public void writeEndElement()
                               throws XMLStreamException

      Specified by:
        `writeEndElement` in interface `XMLStreamWriter`
      Overrides:
        `writeEndElement` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeCData

          public void writeCData(String data)
                          throws XMLStreamException

      Specified by:
        `writeCData` in interface `XMLStreamWriter`
      Overrides:
        `writeCData` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeCharacters

          public void writeCharacters(String text)
                               throws XMLStreamException

      Specified by:
        `writeCharacters` in interface `XMLStreamWriter`
      Overrides:
        `writeCharacters` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeCharacters

          public void writeCharacters(char[] text,
                                      int start,
                                      int len)
                               throws XMLStreamException

      Specified by:
        `writeCharacters` in interface `XMLStreamWriter`
      Overrides:
        `writeCharacters` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeComment

          public void writeComment(String data)
                            throws XMLStreamException

      Specified by:
        `writeComment` in interface `XMLStreamWriter`
      Overrides:
        `writeComment` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeProcessingInstruction

          public void writeProcessingInstruction(String target)
                                          throws XMLStreamException

      Specified by:
        `writeProcessingInstruction` in interface `XMLStreamWriter`
      Overrides:
        `writeProcessingInstruction` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

    - #### writeProcessingInstruction

          public void writeProcessingInstruction(String target,
                                                 String data)
                                          throws XMLStreamException

      Specified by:
        `writeProcessingInstruction` in interface `XMLStreamWriter`
      Overrides:
        `writeProcessingInstruction` in class `StreamWriterDelegate`
      Throws:
        `XMLStreamException`

Copyright © 2005–2017 Apache Software Foundation. All rights reserved.