Yeah I noticed that when testing too. Also you can set the $objXMLDoc.preservewhitespace=1 setting if you ever want to maintain the formatting.