|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
java.io.BufferedWriter
com.lightdev.lib.xml.io.XmlWriter
com.lightdev.lib.xml.io.XmlTreeWriter
public class XmlTreeWriter
Writes XML from a tree model coming from a JXmlTree.
Assumes that the JXmlTree has only nodes that represent
an XmlTag.
XmlTag,
JXmlTree| Field Summary | |
|---|---|
static char |
ATTR_NAME_START
character to indicate the start of an attribute |
static char |
ATTR_SEPARATOR
character to separate an attribute name from an attribute value |
static char |
ATTR_VALUE_BORDER
character to indicate the start or end of an attribute value |
static char |
END_TAG_INDICATOR
character to indicate an end tag |
static char |
INDENT_CHAR
the character to use to indent |
static int |
INDENT_INCREMENT
indent increment per level |
static char |
TAG_END
character to indicate a tag end |
static char |
TAG_START
character to indicate a tag start |
static char |
XML_TAG_INDICATOR
|
| Constructor Summary | |
|---|---|
XmlTreeWriter(Writer out)
construct an XmlTreeWriter |
|
| Method Summary | |
|---|---|
void |
write(JXmlTree tree)
write a given tree in XML format |
| Methods inherited from class com.lightdev.lib.xml.io.XmlWriter |
|---|
indent, writeEndTag, writeStartTag, writeTag, writeTag |
| Methods inherited from class java.io.BufferedWriter |
|---|
close, flush, newLine, write, write, write |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INDENT_INCREMENT
public static final char INDENT_CHAR
public static final char TAG_START
public static final char TAG_END
public static final char END_TAG_INDICATOR
public static final char ATTR_NAME_START
public static final char ATTR_SEPARATOR
public static final char ATTR_VALUE_BORDER
public static final char XML_TAG_INDICATOR
| Constructor Detail |
|---|
public XmlTreeWriter(Writer out)
XmlTreeWriter
out - Writer the writer to write to| Method Detail |
|---|
public void write(JXmlTree tree)
throws IOException
tree - JXmlTree the tree to convert to XML
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||