title: Removing anything between XML tags and their content
body: <p>I would need to remove anything between XML tags, especially whitespace and newlines.</p>
  
  <p>For example removing whitespace and newslines from:<br>
  &lt;/node&gt;    \n&lt;node id="whatever"&gt;  </p>
  
  <p>to get:<br>
  &lt;/node&gt;&lt;node id="whatever"&gt;  </p>
  
  <p><strong>This is not meant for parsing XML by hand</strong>, but rather to prepare XML data before it's getting parsed by a tool. To be more specific, I'm using Hpricot (Ruby) to parse XML and unfortunately we're currently stuck on version 0.6.164, so ... I don't know about more recent versions, but this one often returns weird nodes (Objects) that only contain whitespace and line breaks. So the idea is to clean up the XML before converting it into an Hpricot document. Alternative solutions appreciated.</p>
  
  <p>An example from a test: NoMethodError: undefined method `children' for "\n ":Hpricot::Text<br>
  The interesting part here is not the NoMethodError, because that's just fine, but that the Hpricot::Text element only contains a newline and nothing more.</p>