public class XMLWriter
extends java.io.Writer
Constructor and Description |
---|
XMLWriter(java.io.Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
java.lang.String |
getIndent() |
boolean |
hasSingleTextChild(Element e) |
void |
indent() |
boolean |
isCompact(Element e) |
boolean |
isPadCompact()
If this is true, the writer makes sure that there is a single space before "/>"
|
void |
nl() |
void |
setIndent(java.lang.String indent) |
void |
setPadCompact(boolean padCompact) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(Element e)
Write an element with all attributes and children
|
void |
write(Node node,
java.lang.String s)
If you want to see every node written to the underlying writer, this is the place.
|
void |
writeAttributes(Element e) |
void |
writeAttributeValue(Node node,
java.lang.String value,
char quoteChar) |
void |
writeBeginElement(Element e)
Write the start tag of an element including the attributes.
|
void |
writeChildNodes(NodeWithChildren node)
Write all children of a node
|
void |
writeEndElement(Element e)
Write the end tag of an element
|
protected Node current
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(Node node, java.lang.String s) throws java.io.IOException
node
- s
- java.io.IOException
public void writeAttributeValue(Node node, java.lang.String value, char quoteChar) throws java.io.IOException
java.io.IOException
public void writeChildNodes(NodeWithChildren node) throws java.io.IOException
java.io.IOException
public void write(Element e) throws java.io.IOException
java.io.IOException
public void writeEndElement(Element e) throws java.io.IOException
java.io.IOException
public void writeBeginElement(Element e) throws java.io.IOException
java.io.IOException
public boolean isCompact(Element e)
public boolean hasSingleTextChild(Element e)
public void indent() throws java.io.IOException
java.io.IOException
public void nl() throws java.io.IOException
java.io.IOException
public void writeAttributes(Element e) throws java.io.IOException
java.io.IOException
public void setIndent(java.lang.String indent)
public java.lang.String getIndent()
public void setPadCompact(boolean padCompact)
public boolean isPadCompact()
Copyright © 2008-2013. All Rights Reserved.