title: changing and xml document with powershell and then saving
body: <p>So I'm learning how to manipulate an xml document with powershell. Right now I'm just trying to change a give node and then save the changes. I'm currently stuck at how to save my changes.</p>
  
  <p>Here's what i have.</p>
  
  <pre><code>$xmlfile = "testFile.xml"
  
  $xml = [xml](get-content $xmlfile)
  $employee = $xml.employees.employee
  $employee[1].name = "New Name" // this is where I change the content of the xml file
  //is this an okay way to change the value of the element??
  $xml.save($xmlfile) //why wouldn't this line save my changes??
  </code></pre>
  
  <p>Thanks for your help :)</p>