XML::XSS::Document - XML::XSS document stylesheet rule
version 0.3.5
use XML::XSS; my $xss = XML::XSS->new; my $doc_style = $xss->document; $doc_style->set_pre( "=pod\n" ); $doc_style->set_post( "=cut\n" ); print $xss->render( '<doc>yadah yadah</doc>' );
A XML::XSS rule that matches against the document to be rendered.
XML::XSS
Note that this is the XML::LibXML::Document object, and not the document root element.
XML::LibXML::Document
If set to true, which is the default, the stash cleared before a new document is rendered.
Accessor getter.
Accessor setter.
For a document, the displayed attributes follow the template:
pre [document nodes] post
Printed before the document's nodes.
Printed after the document nodes.
If defined, will be used instead of the child nodes of the document.
A shortcut to the attribute setters.
$doc_style->set( pre => 'foo', post => 'bar', ); # equivalent to $doc_style->set_pre( 'foo' ); $doc_style->set_post( 'bar' );
Applies the rule to the $node, passing along the optional $args, and returns the resulting string.
$node
$args
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 2017, 2013, 2011, 2010 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install XML::XSS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::XSS
CPAN shell
perl -MCPAN -e shell install XML::XSS
For more information on module installation, please visit the detailed CPAN module installation guide.