public class XMLWriter
extends java.lang.Object
IXMLElement
,
Writer
Constructor and Description |
---|
XMLWriter(java.io.OutputStream stream)
Creates a new XML writer.
|
XMLWriter(java.io.Writer writer)
Creates a new XML writer.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public XMLWriter(java.io.Writer writer)
writer
- where to write the output to.public XMLWriter(java.io.OutputStream stream)
stream
- where to write the output to.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void write(IXMLElement xml) throws java.io.IOException
xml
- the non-null XML element to write.java.io.IOException
public void write(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(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(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