GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTML::TEMPLATE::COMPILED::PLUGIN::XMLESCAPE (3)

.ds Aq ’

NAME

HTML::Template::Compiled::Plugin::XMLEscape - XML-Escaping for HTC

CONTENTS

SYNOPSIS



    use HTML::Template::Compiled::Plugin::XMLEscape;

    my $htc = HTML::Template::Compiled->new(
        plugin => [qw(HTML::Template::Compiled::Plugin::XMLEscape)],
        ...
    );



METHODS

register gets called by HTC
escape_xml escapes data for XML CDATA.
escape_xml_attr escapes data for XML attributes

EXAMPLE



    use HTML::Template::Compiled::Plugin::XMLEscape;
    my $htc = HTML::Template::Compiled->new(
        plugin => [qw(HTML::Template::Compiled::Plugin::XMLEscape)],
        tagstyle => [qw(-classic -comment -asp +tt)],
        scalarref => \<foo attr="[%= attribute %]">[%= cdata escape=XML %]</foo>,
        default_escape => XML_ATTR,
    );
    $htc->param(
        attr => foo & bar,
        cdata => text < with > tags,
    );
    print $htc->output;



Output:



    <foo attr="foo & bar">text < with > tags</foo>



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTML::TEMPLATE::COMPILED::PLUGIN::XMLESCAPE (3) 2015-07-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.