Hexadecimal value 0x00 is a invalid character loading XML document
问题 I recently had an XML which would not load. The error message was Hexadecimal value 0x00 is a invalid character received by the minimum of code in LinqPad (C# statements): var xmlDocument = new XmlDocument(); xmlDocument.Load(@"C:\Users\Thomas\AppData\Local\Temp\tmp485D.tmp"); I went through the XML with a hex editor but could not find a 0x00 character. I minimized the XML to <?xml version="1.0" encoding="UTF-8"?> <x> </x> In my hex editor it shows up as Offset(h) 00 01 02 03 04 05 06 07 08