title: How to remove all text from an XML document
body: <p>How can one remove all text, but leave the structure intact?</p>
  
  <p>for example:</p>
  
  <pre><code>&lt;animals&gt;
    &lt;animal id="1"&gt;
      &lt;type&gt;cat&lt;/type&gt;
      &lt;food&gt;
        &lt;fav&gt;miauwmjam&lt;/fav&gt;
        &lt;quantity unit="day"&gt;50g&lt;/quantity&gt;
      &lt;/food&gt;
    &lt;/animal&gt;
  &lt;/animals&gt;
  </code></pre>
  
  <p>transformed into</p>
  
  <pre><code>&lt;animals&gt;
    &lt;animal id=""&gt;
      &lt;type&gt;&lt;/type&gt;
      &lt;food&gt;
        &lt;fav&gt;&lt;/fav&gt;
        &lt;quantity unit=""&gt;&lt;/quantity&gt;
      &lt;/food&gt;
    &lt;/animal&gt;
  &lt;/animals&gt;
  </code></pre>
  
  <p>so also the attribute vales are empty...</p>