title: Howto update XML with groovy's XML Slurper?
body: <p>I read the Groovy Codehaus article about <a href="http://groovy.codehaus.org/Updating+XML+with+XmlSlurper" rel="nofollow">Updating XML with XmlSlurper</a>, this leads me to the following question. Consider we have a input XML structured as the upcoming:</p>
  
  <pre><code>&lt;customer&gt;
    &lt;address&gt;
      &lt;street /&gt;
      &lt;city /&gt;
      &lt;postalcode /&gt;
    &lt;/address&gt;
  &lt;/customer&gt;
  </code></pre>
  
  <p>Is it possible to change the XML without knowing its concrete structure? Concrete: We have a reference to the <code>address</code> Node and want to multiply it 3 times without knowing any details?</p>
  
  <pre><code>address.multiply(3)
  </code></pre>
  
  <p>The output should look like this:</p>
  
  <pre><code>&lt;customer&gt;
    &lt;address&gt;
      &lt;street /&gt;
      &lt;city /&gt;
      &lt;postalcode /&gt;
    &lt;/address&gt;
    &lt;address&gt;
      &lt;street /&gt;
      &lt;city /&gt;
      &lt;postalcode /&gt;
    &lt;/address&gt;
    &lt;address&gt;
      &lt;street /&gt;
      &lt;city /&gt;
      &lt;postalcode /&gt;
    &lt;/address&gt;
  &lt;/customer&gt;
  </code></pre>
  
  <p>This could be possible with <code>appendNode</code> but I'm missing a clone method for nodes in groovy. Is there any solution to achieve this?</p>