title: Remove newlines from MarkupBuilder result
body: <p>Is there a way to control groovy's MarkupBuilder's output and filter out the newline characters? I have code like below:</p>
  
  <pre><code>import groovy.xml.MarkupBuilder
  
  def writer = new StringWriter()
  def xml = new MarkupBuilder(writer)
  xml.basket(){
      fruit (type:"apple", 1)
      fruit (type:"orange", 2)    
  }  
  </code></pre>
  
  <p>which invariably outputs:</p>
  
  <pre><code>&lt;basket&gt;
    &lt;fruit type='apple'&gt;1&lt;/fruit&gt;
    &lt;fruit type='orange'&gt;2&lt;/fruit&gt;
  &lt;/basket&gt;
  </code></pre>
  
  <p>I'd really like it in a single line:</p>
  
  <pre><code>&lt;basket&gt;&lt;fruit type='apple'&gt;1&lt;/fruit&gt;&lt;fruit type='orange'&gt;2&lt;/fruit&gt;&lt;/basket&gt;
  </code></pre>