XML::Generator 0.99 review

Download
by rbytes.net on

XML::Generator is a Perl extension for generating XML. SYNOPSIS use XML::Generator ':pretty'; print foo(bar({ baz => 3 }

License: Perl Artistic License
File size: 21K
Developer: XML::Generator Team
0 stars award from rbytes.net

XML::Generator is a Perl extension for generating XML.

SYNOPSIS

use XML::Generator ':pretty';

print foo(bar({ baz => 3 }, bam()),
bar([ 'qux' => 'http://qux.com/' ],
"Hey there, world"));

# OR

use XML::Generator ();

my $X = XML::Generator->new(':pretty');

print $X->foo($X->bar({ baz => 3 }, $X->bam()),
$X->bar([ 'qux' => 'http://qux.com/' ],
"Hey there, world"));
Either of the above yield:
< foo xmlns:qux="http://qux.com/" >

< bam / >
< /bar >
< qux:bar >Hey there, world< /qux:bar >
< /foo >

In general, once you have an XML::Generator object, you then simply call methods on that object named for each XML tag you wish to generate.

By default, use XML::Generator; tries to export an AUTOLOAD subroutine to your package, which allows you to simply call any undefined methods in your current package to get pieces of XML. If you already have an AUTOLOAD defined then XML::Generator will not override it unless you tell it to. See "STACKABLE AUTOLOADs".

Requirements:
Perl

XML::Generator 0.99 search tags