|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.generationjava.io.xml.AbstractXmlWriter
com.generationjava.io.xml.SimpleXmlWriter
public class SimpleXmlWriter
Makes writing XML much much easier. Improved from article
| Constructor Summary | |
|---|---|
SimpleXmlWriter(Writer writer)
Create an SimpleXmlWriter on top of an existing java.io.Writer. |
|
| Method Summary | |
|---|---|
void |
close()
Close this writer. |
XmlWriter |
endEntity()
End the current entity. |
String |
getDefaultNamespace()
|
Writer |
getWriter()
Obtain the Writer that is at the lowest level of this XmlWriter chain |
void |
setDefaultNamespace(String namespace)
The default namespace. |
XmlWriter |
writeAttribute(String attr,
Object value)
Write an attribute out for the current entity. |
XmlWriter |
writeCData(String cdata)
Write out a chunk of CDATA. |
XmlWriter |
writeComment(String comment)
Write out a chunk of comment. |
XmlWriter |
writeEntity(String name)
Begin to write out an entity. |
XmlWriter |
writeText(Object text)
Output body text. |
XmlWriter |
writeXmlVersion(String version,
String encoding,
String standalone)
Output the version, encoding and standalone nature of an xml file. |
| Methods inherited from class com.generationjava.io.xml.AbstractXmlWriter |
|---|
writeEmptyEntity, writeEntityWithText, writeXmlVersion, writeXmlVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleXmlWriter(Writer writer)
| Method Detail |
|---|
public void setDefaultNamespace(String namespace)
String - nname of the namespacepublic String getDefaultNamespace()
public XmlWriter writeXmlVersion(String version,
String encoding,
String standalone)
throws IOException
IOException
public XmlWriter writeEntity(String name)
throws IOException
name - String name of tag
IOException
public XmlWriter writeAttribute(String attr,
Object value)
throws IOException
String - name of attribute.Object - value of attribute.
IOException
public XmlWriter endEntity()
throws IOException
IOException
public void close()
throws IOException
IOException
public XmlWriter writeText(Object text)
throws IOException
IOException
public XmlWriter writeCData(String cdata)
throws IOException
String - of CDATA text.
IOException
public XmlWriter writeComment(String comment)
throws IOException
String - of text to comment.
IOExceptionpublic Writer getWriter()
XmlWriter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||