Cover Pages Logo SEARCH
Advanced Search
ABOUT
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

NEWS
Cover Stories
Articles & Papers
Press Releases

CORE STANDARDS
XML
SGML
Schemas
XSL/XSLT/XPath
XLink
XML Query
CSS
SVG

TECHNOLOGY REPORTS
XML Applications
General Apps
Government Apps
Academic Apps

EVENTS
LIBRARY
Introductions
FAQs
Bibliography
Technology and Society
Semantics
Tech Topics
Software
Related Standards
Historic

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 pleased to announce the release of XMLWriter 0.1 for Java. This is a SAX2 filter class that can both serialize its events to an XML document and pass them on for further processing. XMLWriter is free (public domain, in fact) and requires the SAX2/Java prerelease announced today.

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.


Globe Image

Document URL: http://xml.coverpages.org/megginsonXMLWriterJava01.html