title: Xml validation using XSD schema
body: <p>The following code helps me validate an XML file with an XSD schema.</p>
  
  <pre><code>XmlReaderSettings settings = new XmlReaderSettings();
  settings.Schemas.Add(null, xsdFilePath);
  settings.ValidationType = ValidationType.Schema;
  settings.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(settings_ValidationEventHandler);
  XmlDocument document = new XmlDocument();
  document.Load(xmlFilePath);
  XmlReader rdr = XmlReader.Create(new StringReader(document.InnerXml), settings);
  
  while (rdr.Read())
  {
  
  }
  isValid = true;
  </code></pre>
  
  <p>The ValidationEventHandler also tells me what the errors are, but doesn't tell me on 'where' or 'on which line' they are located. Is there any way to get the line number where the XML fails to be validated?</p>