public abstract class AbstractXMLPrintVisitor extends java.lang.Object implements SiteDataVisitor
| Modifier and Type | Field and Description |
|---|---|
protected int |
mCurrentIndentIndex
The number of tabs to use for current indent
|
protected java.lang.String |
mNewLine
The new line character to be used
|
protected java.io.Writer |
mWriter
The internal writer
|
| Constructor and Description |
|---|
AbstractXMLPrintVisitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeElement(java.lang.String element)
Generates a closing tag for an element
|
void |
decrementIndentIndex()
Decrements the indent index
|
void |
depart(SiteData data) |
java.lang.String |
getCurrentIndent()
Returns the current indent to be used while writing out
|
java.lang.String |
getNextIndent()
Returns the indent to be used for the nested element.
|
void |
incrementIndentIndex()
Increments the indent index
|
void |
initialize(java.io.Writer writer)
Initialize the visitor implementation
|
void |
visit(SiteData data) |
void |
writeAttribute(java.lang.String key,
java.lang.String value)
Writes an attribute to the stream.
|
void |
writeAttribute(java.io.Writer writer,
java.lang.String key,
java.lang.String value)
Writes an attribute to the stream.
|
protected java.io.Writer mWriter
protected java.lang.String mNewLine
protected int mCurrentIndentIndex
public void initialize(java.io.Writer writer)
initialize in interface SiteDataVisitorwriter - the writerpublic void writeAttribute(java.lang.String key,
java.lang.String value)
throws java.io.IOException
key - the attribute keyvalue - the attribute valuejava.io.IOExceptionpublic void writeAttribute(java.io.Writer writer,
java.lang.String key,
java.lang.String value)
throws java.io.IOException
writer - the stream to write tokey - the attribute keyvalue - the attribute valuejava.io.IOExceptionpublic java.lang.String getCurrentIndent()
public java.lang.String getNextIndent()
public void incrementIndentIndex()
public void decrementIndentIndex()
public void closeElement(java.lang.String element)
throws java.io.IOException
element - the element tag namejava.io.IOExceptionpublic void visit(SiteData data) throws java.io.IOException
visit in interface SiteDataVisitorjava.io.IOExceptionpublic void depart(SiteData data) throws java.io.IOException
depart in interface SiteDataVisitorjava.io.IOException