title: Remove XDocument node by id
body: <p>Hopefully this will be an easy one for someone to fix.</p>
  
  <p>I am removing xml nodes using the following code.</p>
  
  <pre><code>    XDocument XD = XDocument.Parse(content);
      XD.Root.Descendants("{http://www.w3.org/2000/svg}rect").Remove();
  </code></pre>
  
  <p>This works fine but I am now wanting to do a where clause on the rect to remove only the  nodes with the id of "bpr". I've seen a few examples including .Where but this doesn't seem to want to work with my code.</p>
  
  <p>Can anyone help?</p>
  
  <p>Thanks</p>