XMLWriter 0.1 for Java
From: David Megginson <david@MEGGINSON.COM> To: XML-L@LISTSERV.HEANET.IE Subject: ANN: XMLWriter 0.1 for Java
I am
XMLWriter should be suitable for use as a general-purpose streaming XML writer in Java applications, and it includes full Namespace support (including the abilities to select what prefixes to use and what Namespaces to declare on the root element).
XMLWriter 0.1 is available for download from:
http://www.megginson.com/Software/
All the best,
David
David Megginson david@megginson.com http://www.megginson.com/
Announced earlier:
Date: Wed, 5 Apr 2000 08:45:59 -0400 (EDT) From: David Megginson <david@megginson.com> To: XML-Dev List <xml-dev@xml.org> Subject: ANN: XML::Writer 0.4
I've just added XML::Writer 0.4 to my software page at:
http://www.megginson.com/Software/
[http://www.megginson.com/Software/XML-Writer-0.4.tar.gz]
It is working its way into CPAN as we speak.
This version adds some extra functionality to make life easier for people creating data-oriented XML (i.e. no mixed content). There is now a 'data mode' that is disabled by default; when it is enabled, XML::Writer automatically starts each element on a new line. It is also possible to set the indent step (which is ignored unless data mode is active). In safe mode, any mixed content in data mode will be reported as an error.
There is also a new method, dataElement(name, data, atts...), for producing elements that contain only character data content.
For example, here's some code:
my $writer = new XML::Writer; $writer->setDataMode(1); $writer->setDataIndent(2); $writer->startTag("foo"); $writer->dataElement("bar", "abc", "id", "i01"); $writer->endTag("foo"); $writer->end();
This will produce the following XML:
<foo> <bar id="i01">abc</bar> </foo>
Zillions of people have sent e-mail asking for a feature like this, and I'm tired of answering all of it, so here it is.
All the best,
David
David Megginson david@megginson.com http://www.megginson.com/
This is xml-dev, the mailing list for XML developers. List archives are available at http://xml.org/archives/xml-dev/
Prepared by Robin Cover for The XML Cover Pages archive.