Home > General Development > Troubleshooting Common Problems with the XmlSerializer Troubleshooting Common Problems with the XmlSerializer Eugenia Loli 2004-06-21 General Development 1 Comment Christoph Schittko discusses various techniques for diagnosing common problems that occur when converting XML to objects and vice versa with XML Serialization technology in the .NET Framework. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli One Response 2004-06-22 1:04 am Anonymous Here’s another XMLWriter/XMLSerializer/StreamWriter issue that I learned the hard way. Hopefully it will save someone else some headaches. wr = New XmlTextWriter(“file.xml”, New System.Text.Encoding.UTF8) vs. wr = New XmlTextWriter(“file.xml”, New System.Text.UTF8Encoding()) The former always writes the BOM (Byte Order Marker) to the output. This can seariouslly tick off ASP, and a fair number of XML parsers and editors including older Expats. The latter never writes the BOM to the output. Clear as mud.