title: How do I use savon nested attributes! hash?
body: <p>I'm looking at using Ruby savon for SOAP. For purely masochistic reasons I have to deal with SOAP elements having attributes.</p>
  
  <p>So, no problem, there is an example on the savon docs site which highlights this ability:</p>
  
  <pre><code>{ :person =&gt; "Eve", :attributes! =&gt; { :person =&gt; { :id =&gt; 666 } } }.to_soap_xml
  "&lt;person id=\"666\"&gt;Eve&lt;/person&gt;"
  </code></pre>
  
  <p>My problem is how do I set attributes on child elements, for example, say I add an address child element to person: </p>
  
  <pre><code>{ :person =&gt; {:address =&gt; ""}, :attributes! =&gt; { :person =&gt; { :id =&gt; 666 } } }.to_soap_xml
  </code></pre>
  
  <p>Now I want to add an id attribute to the address element:</p>
  
  <p>It's no go if I nest address in the attributes hash:</p>
  
  <pre><code>{ :person =&gt; {:address =&gt; ""}, :attributes! =&gt; { :person =&gt; { :id =&gt; 666, :address =&gt; {:id =&gt; 44 }} }}.to_soap_xml
  </code></pre>
  
  <p>So my question is, how can I get this?</p>
  
  <pre><code>&lt;person id=666&gt;&lt;address id=44&gt;&lt;/address&gt;&lt;/person&gt;
  </code></pre>