title: How to write a bash script that can parse through an XML file as input and remove certain elements from the file
body: <p>I need to create a bash script that manipulates the following sample xml file:</p>
  
  <ol>
  <li>check for a particular ID and remove that XML branch for that ID.</li>
  <li><p>the ID's are read from a text file.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;cmtf xmlns="urn:RM_UPMS_CMTFEnvelopeSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;data xmlns=""&gt;
  &lt;entitygroup entityname="people"&gt;
    &lt;PERSON xmlns="abc"&gt;
      &lt;ID ns=""&gt;12280&lt;/ID&gt;
      &lt;PIN xmlns=""&gt;erererre&lt;/PIN&gt;
      &lt;NAME xmlns=""&gt;ereffdef&lt;/NAME&gt;
    &lt;/PERSON&gt;
    &lt;PERSON xmlns="bbc"&gt;
      &lt;ID ns=""&gt;5567&lt;/ID&gt;
      &lt;PIN xmlns=""&gt;erererre&lt;/PIN&gt;
      &lt;NAME xmlns=""&gt;ereffdef&lt;/NAME&gt;
    &lt;/PERSON&gt;
    &lt;PERSON xmlns="bbc"&gt;
      &lt;ID ns=""&gt;3347&lt;/ID&gt;
      &lt;PIN xmlns=""&gt;ededed&lt;/PIN&gt;
      &lt;NAME xmlns=""&gt;rtreer&lt;/NAME&gt;
    &lt;/PERSON&gt;
    &lt;PERSON xmlns="bbc"&gt;
      &lt;ID ns=""&gt;3249&lt;/ID&gt;
      &lt;PIN xmlns=""&gt;erererre&lt;/PIN&gt;
      &lt;NAME xmlns=""&gt;ereffdef&lt;/NAME&gt;
    &lt;/PERSON&gt;
  &lt;/entitygroup&gt;
  &lt;/data&gt;
  &lt;/cmtf&gt; 
  </code></pre></li>
  </ol>
  
  <p>Here, I need to remove all the <code>&lt;PERSON&gt;</code> tag for all the entries that have the ID 12280, 3249 which is being read from a text file.</p>