Rick Strahl has a good blog entry on how get data from XmlTextWriter with having a Byte Order Mark (BOM) at the start of the data. The trick is to create the encoding manually and pass it with the constructor to XmlTextWriter.</p>
Tech Tags: