Ok...

The code should look like this to get the attribute in there:

builder.type("upgnr"=>"12345"){...

I dont know what I was thinking about.

Still I have a problem with the scope of that variable. I dont
understand how to "pass" the variable to the block within
builder.type...

There's no parameter called csv within the block so it should refer to
the variable outside the block...Im getting confused..

-- 
Posted via http://www.ruby-forum.com/.