XMLWriter version 0.2
18 September 2000


  This class is in the public domain, and comes with no warranty.  
  See the file COPYING for more details.


This is significantly reworked version of XMLWriter 0.1.  Unfortunately,
when I released XMLWriter 0.1, I accidentally omitted the source code
from the distribution; soon afterwards (before I did a tape backup),
my hard drive melted (literally) and I lost the source.

To create this release, I decompiled the class file from the 0.1
distribution, renamed the local variables, and added all-new JavaDoc
documentation.

The XMLWriter class in this release also includes many convenience
functions so that the user does not have to supply unnecessary
parameters.

This release also includes a new class, DataWriter, derived from
XMLWriter.  DataWriter is designed for XML documents that contain
only fielded content (no mixed content), and provides automatic
newlines and indentation for elements.  See the JavaDoc for details.


Installation
------------

Add the following to your Java classpath:

1. xml-writer.jar (included in this distribution)
2. sax2.jar (available from http://www.megginson.com/SAX/Java/)

There are two simple test applications included in this distribution:
TestDataWriter.java writes a simple data-oriented XML document, and
requires no extra support; TestXMLWriter.java performs an identity
transformation on an XML document, and requires a SAX2 parser.

To rebuild XML-Writer from source, you can either compile the source
code directly, or use the ant tool from the Apache Project:

  http://jakarta.apache.org/ant/

The build.xml file in the root directory contains the instructions for
ant -- it is similar to a Makefile, but is platform-independent and
optimized for use with Java.

Information on the previous version of XML-Writer is available below.




XMLWriter version 0.1

  This class is in the public domain, and comes with no warranty.  
  See the file COPYING for more details.


This distribution contains an XMLWriter Java filter class designed to
work with the SAX2/Java prerelease (available at
http://www.megginson.com/SAX/SAX2/).  

Because the class is a filter, you can use it to take a snapshot of
any point in a SAX2 filter chain, as well as serializing the final
result to XML (this may be important for auditing as well).

This class contains support for XML Namespaces.  For more information, 
see the JavaDoc comments in the class itself.

To try out the XMLWriter, try compiling TestXMLWriter.java and running 
it on the supplied XHTML sample:

  java -Dorg.xml.sax.driver=<SAX2 DRIVER> TestXMLWriter sample.xml

Enjoy!


--
David Megginson
sax@megginson.com
$Id: README,v 1.3 2000/09/18 14:40:01 david Exp $
