ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
[ANNOUNCE] XML::Genx
by Dominic Mitchell other posts by this author
Dec 5 2004 10:01AM messages near this date
view in the new Beta List Site
Re: XML::SAX::ExpatXS vs recognized_string | Bad free() error
& XSLT I've written (yet another) XML generator for Perl.  This one is based
around Tim Bray's genx[1] library, so it tries very very hard to only
output well formed XML.  Additionally, it only outputs canonical XML,
which is a winner for me because you can use string comparisons in
tests.  :-)

An example:

  use XML::Genx::Simple;
  my $w = XML::Genx::Simple-> new;
  eval {
    # <root> <foo id="1">bar</foo></root>
    $w-> StartDocFile( *STDOUT );
    $w-> StartElementLiteral( 'root' );
    $w-> Element( foo => 'bar', id => 1 );
    $w-> EndElement;
    $w-> EndDocument;
  };
  die "Writing XML failed: $@" if $@;

Available now at your local CPAN:

  http://search.cpan.org/dist/XML-Genx

I hope this is useful to someone!

-Dom

[1] http://www.tbray.org/ongoing/When/200x/2004/02/20/GenxStatus

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved