|
|||||||||
| 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.EmptyElementXmlWriter
public class EmptyElementXmlWriter
Has various strategies for dealing with null or empty-string values.
| Field Summary | |
|---|---|
static Object |
EMPTY_MODE
Considers null and an empty string to be 'empty'. |
static Object |
IGNORE_EMPTY_MODE
Ignores empty concepts and prints out all attributes/entities. |
static Object |
NULL_EMPTY_MODE
Only considers null to be empty, so empty strings are outputted. |
| Constructor Summary | |
|---|---|
EmptyElementXmlWriter(XmlWriter xmlwriter)
Create an EmptyElementXmlWriter on top of an existing java.io.Writer. |
|
| Method Summary | |
|---|---|
XmlWriter |
setEmptyMode(Object mode)
The emptiness strategy to use. |
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. |
| Methods inherited from class com.generationjava.io.xml.DelegatingXmlWriter |
|---|
close, endEntity, getWriter, writeEmptyEntity, writeEntityWithText, writeXmlVersion, writeXmlVersion, writeXmlVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object IGNORE_EMPTY_MODE
public static final Object NULL_EMPTY_MODE
public static final Object EMPTY_MODE
| Constructor Detail |
|---|
public EmptyElementXmlWriter(XmlWriter xmlwriter)
| Method Detail |
|---|
public XmlWriter setEmptyMode(Object mode)
public XmlWriter writeEntity(String name)
throws IOException
DelegatingXmlWriter
writeEntity in interface XmlWriterwriteEntity in class DelegatingXmlWritername - String name of tag
IOException
public XmlWriter writeAttribute(String attr,
Object value)
throws IOException
DelegatingXmlWriter
writeAttribute in interface XmlWriterwriteAttribute in class DelegatingXmlWriterString - name of attribute.Object - value of attribute.
IOException
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||