title: XML : how to remove all nodes which have no attributes nor child elements
body: <p>I have a xml document like this :</p>
  
  <pre><code>&lt;Node1 attrib1="abc"&gt;
      &lt;node1_1&gt;
           &lt;node1_1_1 attrib2 = "xyz" /&gt;
      &lt;/ node1_1&gt;
  &lt;/Node1&gt;
  
  &lt;Node2 /&gt;    
  </code></pre>
  
  <p>Here <code>&lt;node2 /&gt;</code> is the node i want to remove since it has not children/elements nor any attributes. </p>