is it possible to get a return value from the ValidationEventHandler()

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
Is it possible to gt a return type from the myHandle()?


<pre>XmlReaderSettings settings = new XmlReaderSettings();

settings.Schemas.Add(null, "mySchema.xsd");

settings.ValidationFlags = settings.ValidationFlags | XmlSchemaValidationFlags.ReportValidationWarnings;

settings.ValidationType = ValidationType.Schema;

settings.ValidationEventHandler += new ValidationEventHandler(myHandlers);



using (XmlReader doc = XmlReader.Create("myXML.xml", settings))

{

while (doc.Read()) { }

}

.....

static void myHandlers(object sender, ValidationEventArgs e)

{

}[/code]

ehsan

View the full article
 
Back
Top