]> git.sesse.net Git - xml-template/blob - attribute.pl
Fix attributes in PHP.
[xml-template] / attribute.pl
1 #! /usr/bin/perl
2 use XML::Template;
3
4 my $doc = XML::Template::process_file('clone.xml', {
5         'color' => 'red',
6         '#things' => [
7                 { 'li' => 'Raindrops on roses',    'li.class' => 'odd' },
8                 { 'li' => 'Whiskers on kittens',   'li.class' => 'even' },
9                 { 'li' => 'Bright copper kettles', 'li.class' => 'odd' },
10                 { 'li' => 'Warm, woolen mittens',  'li.class' => 'even' }
11         ]
12 });
13 print $doc->toString;