XML::Writer::Simple 0.01 review

Download
by rbytes.net on

XML::Writer::Simple is a Perl module to create XML files easily! SYNOPSIS use XML::Writer::Simple dtd => "file.dtd";

License: Perl Artistic License
File size: 3K
Developer: Alberto Simoes
0 stars award from rbytes.net

XML::Writer::Simple is a Perl module to create XML files easily!

SYNOPSIS

use XML::Writer::Simple dtd => "file.dtd";

print para("foo",b("bar"),"zbr");

USAGE

This module takes some ideas from CGI to make easier the life for those who need to generated XML code. You can use the module in three flavours (or combine them):
tags

When importing the module you can specify the tags you will be using:
use XML::Writer::Simple tags => [qw/p b i tt/];

print p("Hey, ",b("you"),"! ", i("Yes ", b("you")));
that will generate
< p >Hey < b >you< /b >! < i >Yes < b >you< /b >< /i >< /p >
dtd

You can supply a DTD, that will be analyzed, and the tags used:
use XML::Writer::Simple dtd => "tmx.dtd";

print tu(seg("foo"),seg("bar"));
xml

You can supply an XML (or a reference to a list of XML files). They will be parsed, and the tags used:

use XML::Writer::Simple xml => "foo.xml";

print foo("bar");

Requirements:
Perl

XML::Writer::Simple 0.01 search tags