require 'xtemplate' XTemplate::use_simple_expand() MAX = (ARGV[0] || "3000").to_i xt_data = { # data for Amrita "books" => (0..MAX).collect{|i| { "@isbn" => i, "title" => "book#{i}", "authors" => "author#{i}" } } } t = XTemplate::XMLTemplate.new < EOF t1 = Time.now t.expand2($stdout, xt_data) t2 = Time.now $stderr.puts t2 - t1