OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   ANN: XML::Writer 0.4

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <david@megginson.com>
  • To: XML-Dev List <xml-dev@xml.org>
  • Date: Wed, 5 Apr 2000 08:45:59 -0400 (EDT)

I've just added XML::Writer 0.4 to my software page at


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->dataElement("bar", "abc", "id", "i01");

This will produce the following XML:

    <bar id="i01">abc</bar>

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 Megginson                 david@megginson.com
X-Mailer: VM 6.71 under 21.1 (patch 3) "Acadia" XEmacs Lucid
FCC: /home/david/Mail/sent
--text follows this line--

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS