P
Peter
Hello,
I am having trouble processing an XML file that contains
an error on one of the nodes. How can I instruct the .NET
framework to skip the node and continue when it comes
across a node that contains an error? Please advise.
This is the error:
Hexadecimal value 0x1C is an invalid character
Line 5810, position 83
// Here is my code
XmlDocument doc = new XmlDocument();
FileStream fs = new FileStream(strXmlFileName,
FileMode.Open);
doc.Load(fs);
// Get the node list -- line below is where the error
occurs
XmlNodeList catalog = doc.GetElementsByTagName("product");
P.S - The XML data file is coming from a third party so
we cannot fix the error in it, we just have to deal with
it.
I am having trouble processing an XML file that contains
an error on one of the nodes. How can I instruct the .NET
framework to skip the node and continue when it comes
across a node that contains an error? Please advise.
This is the error:
Hexadecimal value 0x1C is an invalid character
Line 5810, position 83
// Here is my code
XmlDocument doc = new XmlDocument();
FileStream fs = new FileStream(strXmlFileName,
FileMode.Open);
doc.Load(fs);
// Get the node list -- line below is where the error
occurs
XmlNodeList catalog = doc.GetElementsByTagName("product");
P.S - The XML data file is coming from a third party so
we cannot fix the error in it, we just have to deal with
it.