DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

XML::Handler::Composer



NAME

XML::Handler::Composer - Another XML printer/writer/generator


SYNOPSIS

use XML::Handler::Composer;

my $composer = new XML::Handler::Composer ( [OPTIONS] );


DESCRIPTION

XML::Handler::Composer is similar to XML::Writer, XML::Handler::XMLWriter, XML::Handler::YAWriter etc. in that it generates XML output.

This implementation may not be fast and it may not be the best solution for your particular problem, but it has some features that may be missing in the other implementations:


Constructor Options


Method: get_compressed_element_suffix ($event)

Override this method to support the different styles for printing empty elements in compressed notation, e.g. <p/>, <p></p>, <p />, <p>.

The default returns ``/>'', which results in <p/>. Use `` />'' for XHTML style elements or ``>'' for certain HTML style elements.

The $event parameter is the hash reference that was received from the start_element() handler.


Extra PerlSAX event information

XML::Handler::Composer relies on hints from previous SAX filters to format certain parts of the XML. These SAX filters (e.g. XML::Filter::Reindent) pass extra information by adding name/value pairs to the appropriate PerlSAX events (the events themselves are hash references.)


CAVEATS

This code is highly experimental! It has not been tested well and the API may change.


AUTHOR

Send bug reports, hints, tips, suggestions to Enno Derksen at <enno@att.com>.