title: Remove all text nodes from XML file
body: <p>I want to remove all text nodes (but not any other type of node) from an XML file. How can I do this?</p>
  
  <p><em>Example Input:</em></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;root&gt;
  &lt;slideshow id="1"&gt;
  &lt;Image&gt;hii&lt;/Image&gt;
  &lt;ImageContent&gt;this&lt;/ImageContent&gt;
  &lt;Thumbnail&gt;is&lt;/Thumbnail&gt;
  &lt;ThumbnailContent&gt;A&lt;/ThumbnailContent&gt;
  &lt;/slideshow&gt;
  &lt;slideshow id="2"&gt;
  &lt;Image&gt;hii&lt;/Image&gt;
  &lt;ImageContent&gt;this&lt;/ImageContent&gt;
  &lt;Thumbnail&gt;is&lt;/Thumbnail&gt;
  &lt;ThumbnailContent&gt;B&lt;/ThumbnailContent&gt;
  &lt;/slideshow&gt;
  &lt;/root&gt; 
  </code></pre>
  
  <p><em>Expected Output:</em></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;root&gt;
  &lt;slideshow id="1"&gt;
  &lt;Image&gt;&lt;/Image&gt;
  &lt;ImageContent&gt;&lt;/ImageContent&gt;
  &lt;Thumbnail&gt;&lt;/Thumbnail&gt;
  &lt;ThumbnailContent&gt;&lt;/ThumbnailContent&gt;
  &lt;/slideshow&gt;
  &lt;slideshow id="2"&gt;
  &lt;Image&gt;&lt;/Image&gt;
  &lt;ImageContent&gt;&lt;/ImageContent&gt;
  &lt;Thumbnail&gt;&lt;/Thumbnail&gt;
  &lt;ThumbnailContent&gt;&lt;/ThumbnailContent&gt;
  &lt;/slideshow&gt;
  &lt;/root&gt; 
  </code></pre>