org.pf.pax
Class MarkupWriter

java.lang.Object
  extended by org.pf.pax.MarkupWriter

public class MarkupWriter
extends java.lang.Object

A class that helps to write out a markup language (e.g. XML) to a stream.

Version:
1.3
Author:
Manfred Duchrow

Constructor Summary
MarkupWriter(java.io.Writer writer)
          Initialize the new instance with default values.
 
Method Summary
 void beginStartTag(java.lang.String tagName)
           
 java.lang.String contents()
           
 void decIndent()
           
 void finishEmptyTag()
           
 void finishTag()
           
 int getIndentIncrement()
           
 int getIndentLevel()
           
 void incIndent()
           
 void newDecIndentedLine()
           
 void newIncIndentedLine()
           
 void newIndentedLine()
           
 void setIndentIncrement(int newValue)
           
 void useDoubleQuotes()
          Configures the writer to write double quotes ( " ) around attribute values.
 void useSingleQuotes()
          Configures the writer to write single quotes ( ' ) around attribute values.
 void writeAttribute(java.lang.String attrName, java.lang.String value)
           
 void writeEmptyTag(java.lang.String tagName)
           
 void writeEndTag(java.lang.String tagName)
           
 void writeStartTag(java.lang.String tagName)
           
 void writeText(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupWriter

public MarkupWriter(java.io.Writer writer)
Initialize the new instance with default values.

Method Detail

getIndentLevel

public int getIndentLevel()

getIndentIncrement

public int getIndentIncrement()

setIndentIncrement

public void setIndentIncrement(int newValue)

writeStartTag

public void writeStartTag(java.lang.String tagName)

beginStartTag

public void beginStartTag(java.lang.String tagName)

writeEndTag

public void writeEndTag(java.lang.String tagName)

writeEmptyTag

public void writeEmptyTag(java.lang.String tagName)

finishEmptyTag

public void finishEmptyTag()

finishTag

public void finishTag()

writeAttribute

public void writeAttribute(java.lang.String attrName,
                           java.lang.String value)

writeText

public void writeText(java.lang.String text)

newIndentedLine

public void newIndentedLine()

newIncIndentedLine

public void newIncIndentedLine()

newDecIndentedLine

public void newDecIndentedLine()

contents

public java.lang.String contents()

incIndent

public void incIndent()

decIndent

public void decIndent()

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.