title: How to delete a node from Oracle XMLTYPE based on a condition?
body: <p>I have a XML data stored in a <code>CLOB</code> column and I would like to delete some nodes based on a specific condition.</p>
  
  <p>Example XML Data :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;Marco&lt;/surname&gt;
      &lt;name&gt;Gralike&lt;/name&gt;
      &lt;salary&gt;2345&lt;/salary&gt;
    &lt;/person&gt;
    &lt;person&gt;
      &lt;surname&gt;ABC&lt;/surname&gt;
      &lt;name&gt;TEST&lt;/name&gt;
      &lt;salary&gt;1234&lt;/salary&gt;
      &lt;person&gt;
      &lt;surname&gt;Tiger&lt;/surname&gt;
      &lt;name&gt;Scott&lt;/name&gt;
      &lt;salary&gt;2222&lt;/salary&gt;
    &lt;/person&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
   &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;BertJan&lt;/surname&gt;
      &lt;name&gt;Meinders&lt;/name&gt;
      &lt;salary&gt;3456&lt;/salary&gt;
      &lt;salary&gt;125&lt;/salary&gt;
    &lt;/person&gt;
    &lt;person&gt;
      &lt;surname&gt;XYZ&lt;/surname&gt;
      &lt;name&gt;TEST&lt;/name&gt;
      &lt;salary&gt;1234&lt;/salary&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
   &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;Chris&lt;/surname&gt;
      &lt;name&gt;Gralike&lt;/name&gt;
      &lt;salary&gt;4567&lt;/salary&gt;
    &lt;/person&gt;
    &lt;person&gt;
      &lt;surname&gt;LMN&lt;/surname&gt;
      &lt;name&gt;TEST&lt;/name&gt;
      &lt;salary&gt;1234&lt;/salary&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
  </code></pre>
  
  <p>I need a Oracle PLSQL script to delete all the person tags if it contains TEST.</p>
  
  <p>Final output would be :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;Marco&lt;/surname&gt;
      &lt;name&gt;Gralike&lt;/name&gt;
      &lt;salary&gt;2345&lt;/salary&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
   &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;BertJan&lt;/surname&gt;
      &lt;name&gt;Meinders&lt;/name&gt;
      &lt;salary&gt;3456&lt;/salary&gt;
      &lt;salary&gt;125&lt;/salary&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
   &lt;payment&gt;
    &lt;person&gt;
      &lt;surname&gt;Chris&lt;/surname&gt;
      &lt;name&gt;Gralike&lt;/name&gt;
      &lt;salary&gt;4567&lt;/salary&gt;
    &lt;/person&gt;
   &lt;/payment&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>