X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ruby%2Fattribute.rb;fp=ruby%2Fattribute.rb;h=d636555720073b779a1ed5a7c8430ee32c233e66;hb=7d86bc42d79ffdf9a9bd601716c2f832a123a1ce;hp=0000000000000000000000000000000000000000;hpb=0b5e750eae0d8d58ae293beeaf29368431d5b618;p=xml-template diff --git a/ruby/attribute.rb b/ruby/attribute.rb new file mode 100644 index 0000000..d636555 --- /dev/null +++ b/ruby/attribute.rb @@ -0,0 +1,13 @@ +#! /usr/bin/ruby +require "xmltemplate" + +doc = XMLTemplate.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.to_s