|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogist.history.XMLWriter
public class XMLWriter
A simple writer for XML files.
| Constructor Summary | |
|---|---|
XMLWriter(java.io.Writer writer)
Create an XmlWriter on top of an existing java.io.Writer. |
|
| Method Summary | |
|---|---|
void |
close()
Close this writer and its underlying writer |
XMLWriter |
endTag()
End the current tag. |
static java.lang.String |
escapeXml(java.lang.String string)
|
void |
flush()
|
XMLWriter |
writeAttribute(java.lang.String name,
java.lang.Object value)
Write an attribute out for the current tag. |
XMLWriter |
writeAttribute(java.lang.String name,
java.lang.String value)
Write an attribute out for the current tag. |
XMLWriter |
writeComment(java.lang.String comment)
Output a comment. |
XMLWriter |
writeTag(java.lang.String name)
Begin to output a tag. |
void |
writeText(java.lang.Object object)
|
XMLWriter |
writeText(java.lang.String text)
Output body text. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLWriter(java.io.Writer writer)
| Method Detail |
|---|
public XMLWriter writeTag(java.lang.String name)
name - the name of the tag.
public XMLWriter writeAttribute(java.lang.String name,
java.lang.String value)
name - the name of the attributevalue - the value of the attribute
public XMLWriter writeAttribute(java.lang.String name,
java.lang.Object value)
name - the name of the attributevalue - the value of the attributepublic XMLWriter endTag()
XMLWritingException - if there is no open tagpublic void flush()
public void close()
XMLWritingException - if there are unclosed tags.public XMLWriter writeText(java.lang.String text)
text - the text to be writtenpublic XMLWriter writeComment(java.lang.String comment)
comment - the text to be writtenpublic static java.lang.String escapeXml(java.lang.String string)
string - the string to be written to an XML file
public void writeText(java.lang.Object object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||