From: Ken Bloom Date: 2008-10-17T07:09:30+09:00 Subject: Re: Xml Decleration using builder On Thu, 16 Oct 2008 09:14:37 -0500, Dan Webb wrote: > xml.render_choice do > xml.render_choice(:ident => item_ident, :rcardinality => > rcardinality, :rtiming => rtiming) > (1..qammount).each do > xml.response_label do > xml.material do > xml.mattext(response_mattext) > end > end > end > end > > thanks for that. Should have kept on looking, I blame the man flu I had. > I'm having issues with trying to give the parent class the tags. It's > straight forward giving tags that close on the same line extra items. > e.g. > > xml.render_choice(:ident => item_ident, :rcardinality => rcardinality, > :rtiming => rtiming) > > gives > rtiming="No"/> > > But I need to place other tags between this. Any ideas? I can't see > anything in the help file to suggest that it's possible. Just add a block on the call to render_choice xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8", :standalone xml.render_choice do xml.render_choice(:ident => item_ident, :rcardinality => rcardinality, :rtiming => rtiming) do #here (1..qammount).each do xml.response_label do xml.material do xml.mattext(response_mattext) end end end #and here end end -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/