Use the
XmlWriterSettings.Encodeing property to use the encoding you want:
{
XmlWriterSettings xws = new XmlWriterSettings();
xws.Indent = true;
xws.Encoding = Encoding.UTF8;
}
This will cause your application to write UTF-8 encoded XML.
But UTF-8 already is the mentioned property's standard value. So the question remains how the UTF-16 encoded XML arose in the first place.
Does your application create it or do you get it from somewhere?