org.pf.pax
Class XMLWriteController

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.pf.pax.BaseXMLTagInterpreterController
          extended by org.pf.pax.XMLWriteController
All Implemented Interfaces:
XMLTagInterpreterController, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class XMLWriteController
extends BaseXMLTagInterpreterController

This is the controller for wriring a DOM tree to an XML stream.

Version:
1.2
Author:
Manfred Duchrow

Constructor Summary
XMLWriteController(org.xml.sax.XMLReader xmlReader, java.io.Writer writer)
          Initialize the new instance with the given XML reader and writer.
 
Method Summary
 void endDocument()
          Receive notification of the end of a document.
 int getIndentIncrement()
          Returns the number of spaces that are additionally prepended per hierarchy level on each line.
 void setIndentIncrement(int increment)
          Sets the number of spaces that are additionally prepended per hierarchy level on each line.
 void useDoubleQuotes()
          Configures the writer to write double quotes ( " ) around attribute values.
 void useSingleQuotes()
          Configures the writer to write single quotes ( ' ) around attribute values.
 
Methods inherited from class org.pf.pax.BaseXMLTagInterpreterController
getXmlReader, returnControl, setXmlReader, startElement, startElement
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 

Constructor Detail

XMLWriteController

public XMLWriteController(org.xml.sax.XMLReader xmlReader,
                          java.io.Writer writer)
Initialize the new instance with the given XML reader and writer.

Method Detail

useSingleQuotes

public void useSingleQuotes()
Configures the writer to write single quotes ( ' ) around attribute values.


useDoubleQuotes

public void useDoubleQuotes()
Configures the writer to write double quotes ( " ) around attribute values.


endDocument

public void endDocument()
Receive notification of the end of a document.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler

getIndentIncrement

public int getIndentIncrement()
Returns the number of spaces that are additionally prepended per hierarchy level on each line.


setIndentIncrement

public void setIndentIncrement(int increment)
Sets the number of spaces that are additionally prepended per hierarchy level on each line.