## org.exist.util.serializer
Class XMLWriter

    java.lang.Object
      org.exist.util.serializer.XMLWriter

Direct Known Subclasses:
  IndentingXMLWriter, TEXTWriter

public class XMLWriter
extends java.lang.Object

Write XML to a writer. This class defines methods similar to SAX. It deals with opening and closing tags, writing attributes and so on.

Author:
  wolf

Constructor Summary
`XMLWriter()`
`XMLWriter(java.io.Writer writer)`

Method Summary
`void` `attribute(QName qname, java.lang.String value)`
`void` `attribute(java.lang.String qname, java.lang.String value)`
`void` `cdataSection(char[] ch, int start, int len)`
`void` `characters(char[] ch, int start, int len)`
`void` `characters(java.lang.CharSequence chars)`
`void` `comment(java.lang.CharSequence data)`
`void` `documentType(java.lang.String name, java.lang.String publicId, java.lang.String systemId)`
`void` `endDocument()`
`void` `endElement(QName qname)`
`void` `endElement(java.lang.String qname)`
`void` `namespace(java.lang.String prefix, java.lang.String nsURI)`
`void` `processingInstruction(java.lang.String target, java.lang.String data)`
`void` `setDefaultNamespace(java.lang.String namespace)`
`void` `setOutputProperties(java.util.Properties properties)` Set the output properties.
`void` `setWriter(java.io.Writer writer)` Set a new writer.
`void` `startDocument()`
`void` `startElement(QName qname)`
`void` `startElement(java.lang.String qname)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLWriter

    public XMLWriter()

### XMLWriter

    public XMLWriter(java.io.Writer writer)

Method Detail

### setOutputProperties

    public void setOutputProperties(java.util.Properties properties)

  Set the output properties.

  Parameters:
    `properties` - outputProperties

### setWriter

    public void setWriter(java.io.Writer writer)

  Set a new writer. Calling this method will reset the state of the object.

  Parameters:
    `writer` -

### setDefaultNamespace

    public void setDefaultNamespace(java.lang.String namespace)

### startDocument

    public void startDocument()
                       throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### endDocument

    public void endDocument()
                     throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### startElement

    public void startElement(java.lang.String qname)
                      throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### startElement

    public void startElement(QName qname)
                      throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### endElement

    public void endElement(java.lang.String qname)
                    throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### endElement

    public void endElement(QName qname)
                    throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### namespace

    public void namespace(java.lang.String prefix,
                          java.lang.String nsURI)
                   throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### attribute

    public void attribute(java.lang.String qname,
                          java.lang.String value)
                   throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### attribute

    public void attribute(QName qname,
                          java.lang.String value)
                   throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### characters

    public void characters(java.lang.CharSequence chars)
                    throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### characters

    public void characters(char[] ch,
                           int start,
                           int len)
                    throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String data)
                               throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### comment

    public void comment(java.lang.CharSequence data)
                 throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### cdataSection

    public void cdataSection(char[] ch,
                             int start,
                             int len)
                      throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

### documentType

    public void documentType(java.lang.String name,
                             java.lang.String publicId,
                             java.lang.String systemId)
                      throws javax.xml.transform.TransformerException

  Throws:
    `javax.xml.transform.TransformerException`

Copyright (C) Wolfgang Meier. All rights reserved.