Salvation::Service::View::Stack::Convert::To::XML - Salvation::Service::View::Stack to XML converter
my $writer = XML::Writer -> new( ... ); my %args = ( writer => $writer, charset => 'UTF-8', nocharset => 0, tags => { stack => 'stack_xml_tag', list => 'list_xml_tag', frame => 'frame_xml_tag' }, events => { ... } ); Salvation::Service::View::Stack::Convert::To::XML -> parse( $stack, \%args ) ;
XML::Writer
IO::String
Salvation::Service::View::Stack::Parser
Salvation::Service::View::Stack::Convert::To::XML -> parse( $stack, \%args );
Is just a wrapped Salvation::Service::View::Stack::Parser::parse call.
Salvation::Service::View::Stack::Parser::parse
Returns generated XML as plain text.
%args can hold following additional keys:
%args
An XML::Writer object instance.
XML charset. String. An argument to XML::Writer::xmlDecl. Default is UTF-8.
XML::Writer::xmlDecl
UTF-8
Boolean. Indicates whether Salvation::Service::View::Stack::Convert::To::XML should set XML charset and produce xml declaration, or not. Default is true.
A HashRef. Tells parser which XML tags to use.
It can contain:
A tag representing a stack itself. Default is stack which produces following XML:
stack
<stack>...</stack>
A tag representing a frame list. Default is list which produces following XML:
list
<list name="fname">...</list>
A tag representing a single frame. Default is frame which produces following XML:
frame
<frame title="cap" name="fname" type="ftype">...</frame>
This module uses following event handlers:
before_stack
after_stack
before_frame_list
after_frame_list
before_frame_single
after_frame_single
raw
Each %args key is optional.
You can set other event handlers and redefine the ones set by the parser itself.
To install Salvation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Salvation
CPAN shell
perl -MCPAN -e shell install Salvation
For more information on module installation, please visit the detailed CPAN module installation guide.