Is there any way to validate an XML file on an XSD schema with the output of the error line numbers?
The XmlReader reader doesn\'t allow line numbers, it shows only
This example is the most complete I've found. It's slower than other validation methods, but it's the best for debugging: It writes validated element for each line and errors found.
To have numbers of lines with errors just add this line in ValidationHandler method:
Console.WriteLine(args.Exception.LineNumber);
Pay attention that xsd file is specified in the root tag of the Xml doc.