BW::XML::Out - Simple XML output
use BW::XML::Out; my $errstr; my $x = BW::XML::Out->new; error($errstr) if (($errstr = $x->error));
Constructs a new object . . .
Returns an XML element. Can be a start-tag, an end-tag, an empty tag, or a container with or without content.
Returns a string with the XML element. Sets the error string (and returns FAILURE) if there's a problem.
Possible options include:
startTag -- A start-tag, has no content.
endTag -- An end-tag, has no content;
xmlContent -- Do not escape the content;
emptyTag -- An empty tag, has not content, formatted like:
<element />
attribs -- An array ref of hash refs, like this:
$out = $x->('element', undef, { startTag => TRUE, attribs => [ { Att1 => 'one' }, { Att2 => 'two } ] } );
... will return this:
<element Att1="one" Att2="two">
Setter-getter for the indent_mul property.
Setter-getter for the indent_level property.
Returns and clears the object error message.
Written by Bill Weinman <http://bw.org/>.
Copyright (c) 1995-2010 The BearHeart Group, LLC
2010-03-11 bw 1.6.0 -- released to CPAN as part of BW-Lib 2009-11-04 bw 1.5 -- documentation update - option xmlContent 2008-04-23 bw 1.4 -- added noNewline option 2008-03-30 bw 1.3 -- added some options to element 2008-03-26 bw 1.2 -- miscellaneous cleanup 2007-08-13 bw 1.1 -- fixed a zero-vs-defined bug 2007-07-20 bw 1.0 -- initial release as a BW::* module
To install BW::CGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BW::CGI
CPAN shell
perl -MCPAN -e shell install BW::CGI
For more information on module installation, please visit the detailed CPAN module installation guide.