|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.n3.nanoxml.XMLWriter
public class XMLWriter
An XMLWriter writes XML data to a stream.
IXMLElement
,
Writer
Constructor Summary | |
---|---|
XMLWriter(OutputStream stream)
Creates a new XML writer. |
|
XMLWriter(Writer writer)
Creates a new XML writer. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLWriter(Writer writer)
writer
- where to write the output to.public XMLWriter(OutputStream stream)
stream
- where to write the output to.Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void write(IXMLElement xml) throws IOException
xml
- the non-null XML element to write.
IOException
public void write(IXMLElement xml, boolean prettyPrint) throws IOException
xml
- the non-null XML element to write.prettyPrint
- if spaces need to be inserted to make the output more
readable
IOException
public void write(IXMLElement xml, boolean prettyPrint, int indent) throws 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.
IOException
public void write(IXMLElement xml, boolean prettyPrint, int indent, boolean collapseEmptyElements) throws 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.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |