S
sarosh.shirazi
Hi,
I'm facing an illegal character problem when I read an XML file. Below
code was used to do the reading.
XmlReaderSettings settings = new XmlReaderSettings();
settings.CheckCharacters = false;
string fXmlFileName = _FilePath;
XmlReader reader = XmlReader.Create(fXmlFileName,
settings);
XML= new XPathDocument(reader);
The exception comes on the constructor of XPathDocument. I want to
read the file overlooking the characters like (UTF-8 encoding). A
solution pointed out to me was to parse it manually by reading it in
ascii and replacing the characters but this damages my performance
level so i want to avoid it. Any suggestion in this regard would be
most welcome... How can i avoid validation???
I'm facing an illegal character problem when I read an XML file. Below
code was used to do the reading.
XmlReaderSettings settings = new XmlReaderSettings();
settings.CheckCharacters = false;
string fXmlFileName = _FilePath;
XmlReader reader = XmlReader.Create(fXmlFileName,
settings);
XML= new XPathDocument(reader);
The exception comes on the constructor of XPathDocument. I want to
read the file overlooking the characters like (UTF-8 encoding). A
solution pointed out to me was to parse it manually by reading it in
ascii and replacing the characters but this damages my performance
level so i want to avoid it. Any suggestion in this regard would be
most welcome... How can i avoid validation???