## org.exist.util.serializer
Class TEXTWriter

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

public class TEXTWriter
extends XMLWriter

Write PLAIN TEXT to a writer. This class defines methods similar to SAX. It deals with opening and closing tags, writing attributes and so on: they are all ignored. Only real content is written! Note this is an initial version. Code cleanup needed. Original code is commented for fast repair.

Author:
  dizzz, wolf

Constructor Summary
`TEXTWriter()`
`TEXTWriter(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` `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 org.exist.util.serializer.XMLWriter
`setDefaultNamespace`

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

Constructor Detail

### TEXTWriter

    public TEXTWriter()

### TEXTWriter

    public TEXTWriter(java.io.Writer writer)

Method Detail

### setOutputProperties

    public void setOutputProperties(java.util.Properties properties)

  Set the output properties.

  Overrides:
    `setOutputProperties` in class `XMLWriter`
  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.

  Overrides:
    `setWriter` in class `XMLWriter`
  Parameters:
    `writer` -

### startDocument

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

  Overrides:
    `startDocument` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### endDocument

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

  Overrides:
    `endDocument` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### startElement

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

  Overrides:
    `startElement` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### startElement

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

  Overrides:
    `startElement` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### endElement

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

  Overrides:
    `endElement` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### endElement

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

  Overrides:
    `endElement` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### namespace

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

  Overrides:
    `namespace` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### attribute

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

  Overrides:
    `attribute` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### attribute

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

  Overrides:
    `attribute` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### characters

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

  Overrides:
    `characters` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### characters

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

  Overrides:
    `characters` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### processingInstruction

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

  Overrides:
    `processingInstruction` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### comment

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

  Overrides:
    `comment` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

### cdataSection

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

  Overrides:
    `cdataSection` in class `XMLWriter`
  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

  Overrides:
    `documentType` in class `XMLWriter`
  Throws:
    `javax.xml.transform.TransformerException`

Copyright (C) Wolfgang Meier. All rights reserved.