net.n3.nanoxml
Class XMLWriter
An XMLWriter writes XML data to a stream.
Version:
- Marc De Scheemaecker
IXMLElement
, java.io.Writer
XMLWriter(OutputStream stream) - Creates a new XML writer.
|
XMLWriter(Writer writer) - Creates a new XML writer.
|
protected void | finalize() - Cleans up the object when it's destroyed.
|
void | write(IXMLElement xml) - Writes an XML element.
|
void | write(IXMLElement xml, boolean prettyPrint) - Writes an XML element.
|
void | write(IXMLElement xml, boolean prettyPrint, int indent) - Writes an XML element.
|
void | write(IXMLElement xml, boolean prettyPrint, int indent, boolean collapseEmptyElements) - Writes an XML element.
|
XMLWriter
public XMLWriter(OutputStream stream)
Creates a new XML writer.
stream
- where to write the output to.
XMLWriter
public XMLWriter(Writer writer)
Creates a new XML writer.
writer
- where to write the output to.
finalize
protected void finalize()
throws Throwable
Cleans up the object when it's destroyed.
write
public void write(IXMLElement xml)
throws IOException
Writes an XML element.
xml
- the non-null XML element to write.
write
public void write(IXMLElement xml,
boolean prettyPrint)
throws IOException
Writes an XML element.
xml
- the non-null XML element to write.prettyPrint
- if spaces need to be inserted to make the output more
readable
write
public void write(IXMLElement xml,
boolean prettyPrint,
int indent)
throws IOException
Writes an XML element.
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.
write
public void write(IXMLElement xml,
boolean prettyPrint,
int indent,
boolean collapseEmptyElements)
throws IOException
Writes an XML element.
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.