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.
Here's what i have.
$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??
Thanks for your help :)