]> git.sesse.net Git - xml-template/blobdiff - perl/attribute.pl
Organize everything into neat directories.
[xml-template] / perl / attribute.pl
diff --git a/perl/attribute.pl b/perl/attribute.pl
new file mode 100644 (file)
index 0000000..9e4947d
--- /dev/null
@@ -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;