title: Savon - shortcut for prepending every element with namespace? (SOAP)
body: <p>I'm currently building a SOAP client in Ruby, using Savon, but when I write the code to generate the XML, I'm having to write:</p>
  
  <pre><code>builder = Builder::XmlMarkup.new
  builder.ns :request do
      builder.ns :Foo do
          builder.ns :FooBar do
              builder.ns :Bar, "Foo"
          end
      end
  end
  </code></pre>
  
  <p>to generate </p>
  
  <pre><code>&lt;ns:request&gt;
  &lt;ns:Foo&gt;
  &lt;ns:FooBar&gt;
  &lt;ns:Bar&gt;Foo&lt;/ns:Bar&gt;
  &lt;/ns:FooBar&gt;
  &lt;/ns:Foo&gt;
  &lt;/ns:request&gt;
  </code></pre>
  
  <p>Which is obviously quite repetitive, and I'd like to cut out the NS repetitions if possible. I've also noticed that without the ns, I'm allowed to use curly brackets, rather than dos/ends.</p>
  
  <p>Is there any way around this? I don't like not having the ability to use curly brackets, and when I add dynamic input of element names later, it could make things complicated.</p>
  
  <p>I tried</p>
  
  <pre><code>def send_builder(requestsym, data=nil)
  @@builder requestsym, data
  end
  </code></pre>
  
  <p>But my knowledge of blocks/procs/lambdas isn't good enough to make that work with nested elements.</p>