The method of removing the UTF-8 BOM

Today, when dealing with an XML data format is UTF-8, the XML with XDocument to analyze this, obviously format "looks" no problem, but an execution XDocument.Parse appeared "invalid data at the root level. The first 1 line, the position 1. "error message, but not the first line of the first character in the symbol is a small (


Move http://petekcchen.com/2010/11/how-to-remove-bom-in-utf8-xml.html article

Original: Large column  removal method of UTF-8 BOM


Guess you like

Origin www.cnblogs.com/petewell/p/11516336.html