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 TypeMethodDescriptionvoid
close()
void
flush()
boolean
void
indent()
boolean
boolean
If this is true, the writer makes sure that there is a single space before "/>"void
nl()
void
void
setPadCompact
(boolean padCompact) void
write
(char[] cbuf, int off, int len) void
Write an element with all attributes and childrenvoid
If you want to see every node written to the underlying writer, this is the place.void
void
writeAttributeValue
(Node node, String value, char quoteChar) void
Write the start tag of an element including the attributes.void
Write all children of a nodevoid
Write 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in 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 "/>"
-