From 51a7e103a0e3bbe122b006d9b5abaaa27cc64cf8 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 1 Mar 2007 14:33:08 +0100 Subject: [PATCH 1/1] Add a structure test. --- perl/structure.pl | 11 +++++++++++ tests/reference/structure.xml | 22 ++++++++++++++++++++++ tests/test.sh | 2 +- xml/structure.xml | 20 ++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 perl/structure.pl create mode 100644 tests/reference/structure.xml create mode 100644 xml/structure.xml diff --git a/perl/structure.pl b/perl/structure.pl new file mode 100644 index 0000000..8afcd8b --- /dev/null +++ b/perl/structure.pl @@ -0,0 +1,11 @@ +#! /usr/bin/perl +use XML::Template; + +my $doc = XML::Template::process_file('../xml/structure.xml', { + '#outer' => [ + { '#inner' => 'One' }, + { '#inner' => 'Two' }, + { '#inner' => 'Three' }, + ] +}); +print $doc->toString; diff --git a/tests/reference/structure.xml b/tests/reference/structure.xml new file mode 100644 index 0000000..62ed59b --- /dev/null +++ b/tests/reference/structure.xml @@ -0,0 +1,22 @@ + + + +
+