]> git.sesse.net Git - xml-template/blob - ruby/attribute3.rb
Add most of the remaining php5-swig tests. Most succeed, but not all.
[xml-template] / ruby / attribute3.rb
1 #! /usr/bin/ruby
2 require "xmltemplate"
3
4 doc = XMLTemplate.process_file("../xml/clone.xml", {
5         'color' => 'blue',
6         '#things' => XMLTemplate.alternate("li/class", [
7                 { 'li' => 'Raindrops on roses' },
8                 { 'li' => 'Whiskers on kittens' },
9                 nil,
10                 { 'li' => 'Bright copper kettles' },
11                 { 'li' => 'Warm, woolen mittens' }
12         ], "odd", "even")
13 });
14 print doc.to_s