From: Brad Symons Date: 2011-05-06T22:50:30+09:00 Subject: Re: newbie to using builder(for xml markup) Answered BY MYSELF!! There appears to be a conflict with using the :id value, if you have a tag attribute named as this, for some reason it inserts it at the very end. So using: ids.each do |num| xml.programme(:id => num, :alpha => alphas.fetch(ids.index(num))) end will print: but changing, like so: ids.each do |num| xml.programme(:num => num, :alpha => alphas.fetch(ids.index(num))) end will print: SO BE CAREFUL WHEN USING "id" -- Posted via http://www.ruby-forum.com/.