title: What would be the regular expression to remove whitespaces between tags only in an xml file?
body: <p>I've a situation where I've an xml file filled with whitespaces. </p>
  
  <pre><code>&lt;test&gt;  &lt;level&gt;    &lt;sub name="xyz"&gt;test&lt;/sub&gt;   &lt;/level&gt;  &lt;test&gt;
  </code></pre>
  
  <p>I need to remove the whitespace but not the whitespace with the element attribute name as that would make my tag as <code>&lt;subname&gt;</code>. I can recursively look for whitespace till I find <code>&lt;</code> and remove those and if found <code>&gt;</code> then not remove it. I wanted to know if it is possible to do this via a Regular Expression in Java.</p>