|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.generationjava.io.xml.DelegatingXmlWriter
com.generationjava.io.xml.PrettyPrinterXmlWriter
public class PrettyPrinterXmlWriter
Handles indentation on the fly.
| Constructor Summary | |
|---|---|
PrettyPrinterXmlWriter(XmlWriter xmlWriter)
Create an PrettyPrinterXmlWriter on top of an existing XmlWriter. |
|
| Method Summary | |
|---|---|
XmlWriter |
endEntity()
End the current entity. |
XmlWriter |
setIndent(String indent)
Specify the string to prepend to a line for each level of indent. |
XmlWriter |
setNewline(String newline)
Specify the string used to terminate each line when pretty printing. |
XmlWriter |
writeCData(String cdata)
Write out a chunk of CDATA. |
XmlWriter |
writeComment(String comment)
Write out a chunk of comment. |
XmlWriter |
writeEmptyEntity(String name)
A helper method. |
XmlWriter |
writeEntity(String name)
Begin to write out an entity. |
XmlWriter |
writeEntityWithText(String name,
Object text)
A helper method. |
XmlWriter |
writeText(Object text)
Output body text. |
XmlWriter |
writeXmlVersion()
Makes it easy to output the xml version if such a thing is desired. |
XmlWriter |
writeXmlVersion(String version,
String encoding)
|
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.DelegatingXmlWriter |
|---|
close, getWriter, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrettyPrinterXmlWriter(XmlWriter xmlWriter)
| Method Detail |
|---|
public XmlWriter setIndent(String indent)
String - representing one level of indentation while pretty printing.public XmlWriter setNewline(String newline)
String - representing the newline sequence when pretty printing.
public XmlWriter writeXmlVersion()
throws IOException
DelegatingXmlWriter
writeXmlVersion in interface XmlWriterwriteXmlVersion in class DelegatingXmlWriterIOException
public XmlWriter writeXmlVersion(String version,
String encoding)
throws IOException
writeXmlVersion in interface XmlWriterwriteXmlVersion in class DelegatingXmlWriterIOExceptionDelegatingXmlWriter.writeXmlVersion(String, String, String)
public XmlWriter writeXmlVersion(String version,
String encoding,
String standalone)
throws IOException
DelegatingXmlWriter
writeXmlVersion in interface XmlWriterwriteXmlVersion in class DelegatingXmlWriterIOException
public XmlWriter writeEntity(String name)
throws IOException
DelegatingXmlWriter
writeEntity in interface XmlWriterwriteEntity in class DelegatingXmlWritername - String name of tag
IOException
public XmlWriter endEntity()
throws IOException
endEntity in interface XmlWriterendEntity in class DelegatingXmlWriterIOException
public XmlWriter writeText(Object text)
throws IOException
writeText in interface XmlWriterwriteText in class DelegatingXmlWriterIOException
public XmlWriter writeCData(String cdata)
throws IOException
writeCData in interface XmlWriterwriteCData in class DelegatingXmlWriterString - of CDATA text.
IOException
public XmlWriter writeComment(String comment)
throws IOException
writeComment in interface XmlWriterwriteComment in class DelegatingXmlWriterString - of text to comment.
IOException
public XmlWriter writeEntityWithText(String name,
Object text)
throws IOException
writeEntityWithText in interface XmlWriterwriteEntityWithText in class DelegatingXmlWritername - String name of tagtext - String of text to go inside the tag
IOException
public XmlWriter writeEmptyEntity(String name)
throws IOException
writeEmptyEntity in interface XmlWriterwriteEmptyEntity in class DelegatingXmlWritername - String name of tag
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||