]> git.sesse.net Git - xml-template/commitdiff
Add ruby/structure test, passes.
authorsgunderson@bigfoot.com <>
Thu, 1 Mar 2007 13:37:10 +0000 (14:37 +0100)
committersgunderson@bigfoot.com <>
Thu, 1 Mar 2007 13:37:10 +0000 (14:37 +0100)
ruby/structure.rb [new file with mode: 0644]

diff --git a/ruby/structure.rb b/ruby/structure.rb
new file mode 100644 (file)
index 0000000..309237b
--- /dev/null
@@ -0,0 +1,11 @@
+#! /usr/bin/ruby
+require "xmltemplate"
+
+doc = XMLTemplate.process_file("../xml/structure.xml", {
+       '#outer' => [
+               { '#inner' => 'One' },
+               { '#inner' => 'Two' },
+               { '#inner' => 'Three' },
+       ]
+});
+print doc.to_s