There is no Unicode byte order mark. Cannot switch to Unicode
I am writing an XML validator with XSD. Below is what I did, but when the validator reached the line while (list.Read()) it gives me the error There is no Unicode byte order mark. Cannot switch to Unicode. Can anybody help me fix it? public class Validator { public void Validate(string xmlString) { Boolean bRet = true; string xmlPath = @"C:\x.xml"; string xsdPath = @"C:\general.xsd"; XmlReaderSettings Settings = new XmlReaderSettings(); Settings.Schemas.Add("", xsdPath); Settings.ValidationType = ValidationType.Schema; Settings.ValidationEventHandler += new ValidationEventHandler