How to get invalid XMLNode in XmlReaderSettings.ValidationEventHandler in C#
问题 I am trying to construct a custom Error Message for unsuccessful XML validation using the callback validation event. I noticed that the sender object of the element is XMLReader and i got the Element or current Node name from ((XmlReader)sender).Name and exeception message from ValidationEventargs.Exception.Message. I trying to build the path of the current node failing in the validation by getting the parent nodes of the current node Given below is the code snippet XmlReaderSettings xrs =