M
Mic
Hi,
I'm doing validation of a xml file with a xsd schema and it works
fine.
I get validation errors in the form:
«Message:{0} The 'NAM' attribute has an invalid value according to its
data type. An error occurred at file:///A:/myfile.xml, (526, 12).»
I can isolate line and column using the args.Exception.LineNumber and
args.Exception.LinePosition properties.
Unfortunately, there is no property to retrieve the element or
attribute name. I have to make a search in the Message string to get
it. And there is no apparent way of getting the value in fault.
Identifying errors is fine but then I need to correct them. I can do
corrections manually using the line and column positions but it's not
very practical for large files.
How can I link the informations given by the XmlValidatingReader to a
dataset or anything that can help me make modifications to correct the
errors ?
thanks
I'm doing validation of a xml file with a xsd schema and it works
fine.
I get validation errors in the form:
«Message:{0} The 'NAM' attribute has an invalid value according to its
data type. An error occurred at file:///A:/myfile.xml, (526, 12).»
I can isolate line and column using the args.Exception.LineNumber and
args.Exception.LinePosition properties.
Unfortunately, there is no property to retrieve the element or
attribute name. I have to make a search in the Message string to get
it. And there is no apparent way of getting the value in fault.
Identifying errors is fine but then I need to correct them. I can do
corrections manually using the line and column positions but it's not
very practical for large files.
How can I link the informations given by the XmlValidatingReader to a
dataset or anything that can help me make modifications to correct the
errors ?
thanks