public class XMLWriterNano
extends java.lang.Object
implements java.lang.AutoCloseable
IXMLElement
,
Writer
Constructor and Description |
---|
XMLWriterNano(java.io.OutputStream stream)
Creates a new XML writer.
|
XMLWriterNano(java.io.Writer writer)
Creates a new XML writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up the object when it's destroyed.
|
void |
write(net.n3.nanoxml.IXMLElement xml)
Writes an XML element.
|
void |
write(net.n3.nanoxml.IXMLElement xml,
boolean prettyPrint)
Writes an XML element.
|
void |
write(net.n3.nanoxml.IXMLElement xml,
boolean prettyPrint,
int indent)
Writes an XML element.
|
void |
write(net.n3.nanoxml.IXMLElement xml,
boolean prettyPrint,
int indent,
boolean collapseEmptyElements)
Writes an XML element.
|
public XMLWriterNano(java.io.Writer writer)
writer
- where to write the output to.public XMLWriterNano(java.io.OutputStream stream)
stream
- where to write the output to.public void close()
close
in interface java.lang.AutoCloseable
public void write(net.n3.nanoxml.IXMLElement xml) throws java.io.IOException
xml
- the non-null XML element to write.java.io.IOException
public void write(net.n3.nanoxml.IXMLElement xml, boolean prettyPrint) throws java.io.IOException
xml
- the non-null XML element to write.prettyPrint
- if spaces need to be inserted to make the output more
readablejava.io.IOException
public void write(net.n3.nanoxml.IXMLElement xml, boolean prettyPrint, int indent) throws java.io.IOException
xml
- the non-null XML element to write.prettyPrint
- if spaces need to be inserted to make the output more
readableindent
- how many spaces to indent the element.java.io.IOException
public void write(net.n3.nanoxml.IXMLElement xml, boolean prettyPrint, int indent, boolean collapseEmptyElements) throws java.io.IOException
xml
- the non-null XML element to write.prettyPrint
- if spaces need to be inserted to make the output more
readableindent
- how many spaces to indent the element.java.io.IOException