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.
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.
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.