I don’t want to do anything, I just want to make sure the document is valid, and print an error message if it is not. Google pointed me to this one , but it looks like the XmlValidatingReader is out of date (at least what MonoDevelop tells me).
Edit: I'm trying to ask Mehrdad, but I have problems. I think I have most of this, but I cannot find OnValidationEvent anywhere. Where can I get an OnValidationEvent?
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.DTD;
settings.ValidationEventHandler += new ValidationEventHandler();
XmlReader validatingReader = XmlReader.Create(fileToLoad, settings);
source
share