title: Use of Namespaces in Groovy MarkupBuilder
body: <p>I want have the following output:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;structure:structuralDataRoot xmlns:register="http://www.test.ch/register/1" xmlns:structure="http://test.ch/structure/1" &gt;
    &lt;structure:tester&gt;ZH&lt;/structure:tester&gt;
    &lt;structure:surveyYear&gt;2001&lt;/structure:surveyYear&gt;
    &lt;structure:surfaceData&gt;
      &lt;structure:houseSurfaceData&gt;
        &lt;structure:creationDate&gt;2001-01-01&lt;/structure:creationDate&gt;
        &lt;structure:localFarmId&gt;
          &lt;register:houseIdCategory&gt;token&lt;/register:houseIdCategory&gt;
          &lt;register:houseId&gt;token&lt;/register:houseId&gt;
        &lt;/structure:localFarmId&gt;
      &lt;/structure:houseSurfaceData&gt;
    &lt;/structure&gt;
  </code></pre>
  
  <p>I can add namespace to an xml like this:</p>
  
  <pre><code>xml.records('xmlns:structure' :"http://test.ch/structure/1" ...
  </code></pre>
  
  <p>But how I can make a namespace prefix to an xml-element?
  The only solution I found was this:</p>
  
  <pre><code>tester('xmlns:structure' :"http://test.ch/structure/1", 'ZH')
  </code></pre>
  
  <p>But this gives me the follwing output:</p>
  
  <pre><code>&lt;tester xmlns:structure='http://test.ch/structure/1'&gt;ZH&lt;/tester&gt;
  </code></pre>
  
  <p>It's syntactical correct, but not nice to read when you have many nodes.</p>