NAME

XML::Output - Perl module for writing simple XML documents

SYNOPSIS

use XML::Output;

open(FH,'>file.xml');
my $xo = new XML::Output({'fh' => *FH});
$xo->open('tagname', {'attrname' => 'attrval'});
$xo->pcdata('element content');
$xo->close();
close(FH);

ABSTRACT

XML::Output is a Perl module for writing simple XML documents

DESCRIPTION

XML::Output is a Perl module for writing simple XML document. The
following methods are provided.
new
$xo = new XML::Output;

Constructs a new XML::Output object.

open
$xo->open('tagname', {'attrname' => 'attrval'});

Open an element with specified name (and optional attributes)

close
$xo->close;

Close an element

empty
$xo->empty('tagname', {'attrname' => 'attrval'});

Insert an empty element with specified name (and optional attributes)

pcdata
$xo->pcdata('element content');

Insert text

comment
$xo->comment('comment text');

Insert a comment

xmlstr
print $xo->xmlstr;

Get a string representation of the constructed document

SEE ALSO

XML::DTD

AUTHOR

Brendt Wohlberg <wohl@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004-2010 by Brendt Wohlberg

This library is available under the terms of the GNU General Public License (GPL), described in the GPL file included in this distribution.