Package tigase.xml

## Class XMLFormatter

- java.lang.Object
- - tigase.xml.XMLFormatter

- All Implemented Interfaces:
    `SimpleHandler`

      public class XMLFormatter
      extends java.lang.Object
      implements SimpleHandler

  This is temporary code used for testing purposes only. It is subject to change or remove at any time of server development. It has been created to format XML files to make them easier to read and modify by a human. With current `XMLDB` implementation however it is not necessary to use this formatter for configuration files and user repositories as they are saved in proper format.

  Created: Thu Oct 21 14:49:41 2004

  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XMLFormatter​(java.io.OutputStream out)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `elementCData​(java.lang.StringBuilder cdata)` |
    `boolean` | `endElement​(java.lang.StringBuilder name)` |
    `void` | `error​(java.lang.String errorMessage)` |
    `static void` | `main​(java.lang.String[] args)` |
    `void` | `otherXML​(java.lang.StringBuilder other)` |
    `void` | `outputExtraData​(java.lang.String extra)` |
    `java.lang.Object` | `restoreParserState()` |
    `void` | `saveParserState​(java.lang.Object object)` |
    `void` | `startElement​(java.lang.StringBuilder name, java.lang.StringBuilder[] att_names, java.lang.StringBuilder[] att_values)` |

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

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

- - ### Constructor Detail

    - #### XMLFormatter

          public XMLFormatter​(java.io.OutputStream out)

  - ### Method Detail

    - #### main

          public static void main​(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### error

          public void error​(java.lang.String errorMessage)

      Specified by:
        `error` in interface `SimpleHandler`

    - #### startElement

          public void startElement​(java.lang.StringBuilder name,
                                   java.lang.StringBuilder[] att_names,
                                   java.lang.StringBuilder[] att_values)

      Specified by:
        `startElement` in interface `SimpleHandler`

    - #### elementCData

          public void elementCData​(java.lang.StringBuilder cdata)

      Specified by:
        `elementCData` in interface `SimpleHandler`

    - #### endElement

          public boolean endElement​(java.lang.StringBuilder name)

      Specified by:
        `endElement` in interface `SimpleHandler`

    - #### otherXML

          public void otherXML​(java.lang.StringBuilder other)

      Specified by:
        `otherXML` in interface `SimpleHandler`

    - #### saveParserState

          public void saveParserState​(java.lang.Object object)

      Specified by:
        `saveParserState` in interface `SimpleHandler`

    - #### restoreParserState

          public java.lang.Object restoreParserState()

      Specified by:
        `restoreParserState` in interface `SimpleHandler`

    - #### outputExtraData

          public void outputExtraData​(java.lang.String extra)