title: How do I alter XML with PowerShell/XPath and save the document?
body: <p>I'm looking to use PowerShell to alter XML. I haven't been able to copy XML using XPath. I can load the XML, but I can't figure out how to list the XML with an XPath and create another XML file with what I retrieve. </p>
  
  <pre><code>$doc = new-object "System.Xml.XmlDocument"
  $doc.Load("XmlPath.xml")
  </code></pre>
  
  <p>Also, how would you add the removed XML to another XML file?</p>