This is what I have so far:
$XML = New-Object System.Xml.XmlDocument $XML.PreserveWhitespace = $true $XML.Load($path) #change some node attributes $XML.Save(
No XML parser in the world is going to tell you whether the attributes in a start tag are separated by spaces, newlines, or tabs. You aren't supposed to care.