title: Function RemoveChild(XmlNode node) failed in C#
body: <p>When I try to remove some of my child element with RemoveChild(). But throw exception.
  I attached my code below.</p>
  
  <pre><code>    nodeName = doc.SelectSingleNode("//Equipment//DataCollections//EnabledIDs//MyID[@id='" + attrValue + "']"); 
     // Found the nodeName successfully druing run time.
      doc.DocumentElement.RemoveChild(nodeName); 
     // faild to Remove the node
  </code></pre>
  
  <p>Show error below:</p>
  
  <pre><code>An unhandled exception of type 'System.ArgumentException' occurred in System.Xml.dll
  
  Additional information: The node to be removed is not a child of this node. 
  </code></pre>
  
  <p>How can I remove the node? </p>
  
  <p><strong>[Update]</strong></p>
  
  <p>VS2005 &amp; .NET 2.0 used.</p>