]> git.sesse.net Git - xml-template/blobdiff - ruby/structure.rb
Add ruby/structure test, passes.
[xml-template] / ruby / structure.rb
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