Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTML::Template::CompilUserPContributedTPerlaDo::Compiled::Plugin::XMLEscape(3)

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

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 &amp;	bar">text &lt; with &gt; tags</foo>

perl v5.32.1			HTML::Template::Compiled::Plugin::XMLEscape(3)

NAME | SYNOPSIS | METHODS | EXAMPLE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTML::Template::Compiled::Plugin::XMLEscape&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help