]> git.sesse.net Git - xml-template/blob - include.pl
Add alternate() to the PHP version, which should now be rather feature-complete.
[xml-template] / include.pl
1 #! /usr/bin/perl
2 use XML::Template;
3
4 my $doc = XML::Template::process_file('included.xml', {
5         'color' => 'red'
6 });
7 my $master = XML::Template::process_file('master.xml', {
8         'title' => 'Main HTML title',
9         'h1' => 'Nice heading here',
10         'contents' => $doc
11 });
12 print $master->toString;