title: Condtionally remove section of XML file
body: <p>I am looking for a solution to this problem and suspect awk should provide a simple enough solution instead of my clumsy shell script. </p>
  
  <p>I have an xml file consisting of multiple sections as shown below. I also have a list of values.</p>
  
  <p>For each section <code>&lt;top_tag&gt; ... &lt;/top_tag&gt;</code> where value_x is in my list, delete (ie:not print) the section <code>&lt;top_tag&gt; ... &lt;/top_tag&gt;</code></p>
  
  <pre><code>&lt;xml&gt;
  &lt;outer_tag&gt;
     &lt;top_tag&gt;
        &lt;tag&gt;value_1&lt;/tag&gt;
        &lt;other_tags&gt;&lt;/other_tags&gt;
     &lt;/top_tag&gt;
     &lt;top_tag&gt;
        &lt;tag&gt;value_2&lt;/tag&gt;
        &lt;other_tags&gt;&lt;/other_tags&gt;
     &lt;/top_tag&gt;
      ...
     &lt;top_tag&gt;
        &lt;tag&gt;value_n&lt;/tag&gt;
        &lt;other_tags&gt;&lt;/other_tags&gt;
     &lt;/top_tag&gt;
  &lt;/outer_tag&gt;
  </code></pre>
  
  <p>Your suggestions are most appreciated.</p>