Package de.pdark.decentxml
Class XMLWriter
java.lang.Object
java.io.Writer
de.pdark.decentxml.XMLWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()booleanvoidindent()booleanbooleanIf this is true, the writer makes sure that there is a single space before "/>"voidnl()voidvoidsetPadCompact(boolean padCompact) voidwrite(char[] cbuf, int off, int len) voidWrite an element with all attributes and childrenvoidIf you want to see every node written to the underlying writer, this is the place.voidvoidwriteAttributeValue(Node node, String value, char quoteChar) voidWrite the start tag of an element including the attributes.voidWrite all children of a nodevoidWrite the end tag of an element
-
Field Details
-
writer
-
current
-
indent
-
level
private int level -
padCompact
private boolean padCompact
-
-
Constructor Details
-
XMLWriter
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
If you want to see every node written to the underlying writer, this is the place.- Parameters:
node-s-- Throws:
IOException
-
writeAttributeValue
- Throws:
IOException
-
writeChildNodes
Write all children of a node- Throws:
IOException
-
write
Write an element with all attributes and children- Throws:
IOException
-
writeEndElement
Write the end tag of an element- Throws:
IOException
-
writeBeginElement
Write the start tag of an element including the attributes.- Throws:
IOException
-
isCompact
-
hasSingleTextChild
-
indent
- Throws:
IOException
-
nl
- Throws:
IOException
-
writeAttributes
- Throws:
IOException
-
setIndent
-
getIndent
-
setPadCompact
public void setPadCompact(boolean padCompact) -
isPadCompact
public boolean isPadCompact()If this is true, the writer makes sure that there is a single space before "/>"
-