title: Removing multiple child elements from XML
body: <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Root&gt;
    &lt;Book&gt;
      &lt;Name&gt;Title1&lt;/Name&gt;
      &lt;Name&gt;Title2&lt;/Name&gt;
      &lt;Name&gt;Title3&lt;/Name&gt;
      &lt;Name&gt;Title3&lt;/Name&gt;
      &lt;Name&gt;Title3&lt;/Name&gt;
    &lt;/Book&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>I would like to delete few selected Name elements from Book node. I tried following approach but doesn't seem to work. What would be the right way to delete the child node using given array (ex. <code>$delnode</code>)?</p>
  
  <pre><code>$delnode = 'Title1','Title2'
  $xml.Root.Book | ? {$delnode -eq $_.Name} | % {$xml.Root.Book.RemoveChild($_)}
  </code></pre>
  
  <p>Thanks in advance.</p>