| Template-TAL documentation | Contained in the Template-TAL distribution. |
Template::TAL::Output::XML - output templates as XML
my $tt = Template::TAL->new( output => "Template::TAL::Output::XML" );
print $tt->process('foo.tal');
This is a Template::TAL output filter that produces straight XML output from the templates.
Written by Tom Insam, Copyright 2005 Fotango Ltd. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Template-TAL documentation | Contained in the Template-TAL distribution. |
package Template::TAL::Output::XML; use warnings; use strict; use Carp qw( croak ); use base qw( Template::TAL::Output ); use Encode; sub render { my ($self, $dom) = @_; $dom->setEncoding( $self->charset ); return Encode::encode( $self->charset, $dom->toString() ); }
1;