Improving iterative manipulation on XML elements
Let us say you have a node like this which is having two nodes , node1 and node 2, you need to specify xpath using "|" seperated . here is an example .

XPathSelectElement should be replaced with XPathSelectElements.

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;customer&gt;
  &lt;node1&gt;
  &lt;/node1&gt;
  &lt;node2&gt;
  &lt;/node2&gt;
&lt;/customer&gt;




//all you need sepcify is a "|" to work it out.
doc.XPathSelectElements("//node1 | //node2").Remove();