net.xoetrope.xml
Interface XmlWriter

All Known Implementing Classes:
JaxpXmlWriter, NanoXmlWriter

public interface XmlWriter

An interface used while writing XML

Copyright (c) Xoetrope Ltd., 1998-2004

$Revision: 2.2 $


Method Summary
 void setOutputStream(java.io.FileOutputStream fos)
          Set the OutputStream to be used by the write function.
 void write(XmlElement xml, boolean prettyPrint, int indent)
          Write the contents of an XmlElement out to the outputstream specified by setOutputStream
 

Method Detail

write

void write(XmlElement xml,
           boolean prettyPrint,
           int indent)
           throws java.io.IOException
Write the contents of an XmlElement out to the outputstream specified by setOutputStream

Parameters:
xml - The root XmlElement to be output
prettyPrint - If true the XML will be output in a more readable format
indent - If true the XML will be indented
Throws:
java.io.IOException - Throw an IOException if anything goes wrong

setOutputStream

void setOutputStream(java.io.FileOutputStream fos)
Set the OutputStream to be used by the write function. This needs to be set before writing.

Parameters:
fos - The FileOutputStream to which the XML will be written