X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=perl%2Fattribute.pl;fp=perl%2Fattribute.pl;h=9e4947d459777a8602820e0ed5ec8c2e64044f59;hb=0ab1206b77606af6714e14f4088bef28f89733d5;hp=0000000000000000000000000000000000000000;hpb=476210dffd6b1cc857d9131e5ed5701c70026811;p=xml-template diff --git a/perl/attribute.pl b/perl/attribute.pl new file mode 100644 index 0000000..9e4947d --- /dev/null +++ b/perl/attribute.pl @@ -0,0 +1,13 @@ +#! /usr/bin/perl +use XML::Template; + +my $doc = XML::Template::process_file('../xml/clone.xml', { + 'color' => 'red', + '#things' => [ + { 'li' => 'Raindrops on roses', 'li.class' => 'odd' }, + { 'li' => 'Whiskers on kittens', 'li.class' => 'even' }, + { 'li' => 'Bright copper kettles', 'li.class' => 'odd' }, + { 'li' => 'Warm, woolen mittens', 'li.class' => 'even' } + ] +}); +print $doc->toString;