title: Remove xsi nil through regex
body: <p>I have a third party component that produce serialized xml and stored procedure that parse xml and insert values into tables.</p>
  
  <p>I am having trouble with xsi nil handled in the component and sql stored procedure. I don't have control to change either the component or the stored procedure. So the IsNullable attribute on the property solution and  not xsi=true on the procedure solution doesn't help me. </p>
  
  <p>I am trying to handle this using regex. </p>
  
  <pre><code>.*xsi\:nil\=\"true\" \/\&gt;
  </code></pre>
  
  <p>The above regex match works perfect for the below input</p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;prop1&gt;
      &lt;prop11&gt;abc&lt;/prop11&gt;
      &lt;prop12 xsi:nil="true" /&gt;
      &lt;prop13&gt;def&lt;/prop13&gt;
  &lt;/prop1&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>But not for this input</p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;prop1&gt;&lt;prop11&gt;abc&lt;/prop11&gt;&lt;prop12 xsi:nil="true" /&gt;&lt;prop13&gt;def&lt;/prop13&gt;&lt;/prop1&gt;&lt;/Root&gt;
  </code></pre>
  
  <p>Desired output is</p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;prop1&gt;
      &lt;prop11&gt;abc&lt;/prop11&gt;
      &lt;prop13&gt;def&lt;/prop13&gt;
  &lt;/prop1&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Update:
  The property name and the level is only known at run time. Please refer a different xml below</p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;pa&gt;
      &lt;paa&gt;abc&lt;/paa&gt;
      &lt;pab xsi:nil="true" /&gt;
      &lt;pac&gt;def&lt;/pac&gt;
              &lt;pad&gt;
                 &lt;pada&gt;val1&lt;/pada&gt;
                 &lt;padb xsi:nil="true" /&gt;
                 &lt;padc&gt;
                       &lt;padca&gt;vala&lt;/padca&gt;
                       &lt;padcb xsi:nil="true" /&gt;
                 &lt;/padc&gt;
              &lt;pad&gt;
  &lt;/prop1&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>The desired output for the above xml is </p>
  
  <pre><code>&lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;pa&gt;
      &lt;paa&gt;abc&lt;/paa&gt;
      &lt;pac&gt;def&lt;/pac&gt;
              &lt;pad&gt;
                 &lt;pada&gt;val1&lt;/pada&gt;
                 &lt;padc&gt;
                       &lt;padca&gt;vala&lt;/padca&gt;
                 &lt;/padc&gt;
              &lt;pad&gt;
  &lt;/prop1&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Could someone please help me </p>
  
  <p>Thanks,</p>
  
  <p>Esen</p>