X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ruby%2Finclude.rb;fp=ruby%2Finclude.rb;h=ce391e42557f89f86caf4fe7a753d28c957ba90c;hb=7d86bc42d79ffdf9a9bd601716c2f832a123a1ce;hp=0000000000000000000000000000000000000000;hpb=0b5e750eae0d8d58ae293beeaf29368431d5b618;p=xml-template diff --git a/ruby/include.rb b/ruby/include.rb new file mode 100644 index 0000000..ce391e4 --- /dev/null +++ b/ruby/include.rb @@ -0,0 +1,12 @@ +#! /usr/bin/ruby +require "xmltemplate" + +doc = XMLTemplate.process_file("../xml/included.xml", { + "color" => "red" +}, false) +master = XMLTemplate.process_file("../xml/master.xml", { + "title" => "Main HTML title", + "h1" => "Nice heading here", + "contents" => doc +}); +print master.to_s