Class XMLWriterImpl

java.lang.Object
com.topologi.diffx.xml.XMLWriterBase
com.topologi.diffx.xml.XMLWriterImpl
All Implemented Interfaces:
XMLWriter

public final class XMLWriterImpl extends XMLWriterBase implements XMLWriter
A simple writer for XML data that does not support namespaces.

Provides methods to generate well-formed XML data easily, wrapping a writer.

This version only supports utf-8 encoding, if writing to a file make sure that the encoding of the file output stream is "utf-8".

The recommended implementation is to use a BufferedWriter to write.

  Writer writer =
     new BufferedWriter(new OutputStreamWriter(new FileOutputStream("foo.out"),"utf-8"));
 

This class is not synchronised and does not support namespaces, and will therefore throw an unsupported operation exception for each call to a method that uses namespaces.

Version:
6 December 2008