I can't comment on what makes an XML file viewable in IE, but I'd recommend you format the header based on the SAP requirement.
To avoid multiple lines in your XML output, use TextStream.Write instead of WriteLine (XMLFile.Write in your code). An XML parser shouldn't read whitespace, but if it causes problems for SAP, clean them out.
Michael Thanks! Also I found the other answer after some digging. the code set needed to be set to unicode when setting the file
Set XMLfile = fso.CreateTextFile(sPathName, True, True) The second true sets to unicode.