NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlTextReader.ValidationCallback

Gets or sets a callback delegate for receiving information about DTD validation errors.

[Visual Basic]
Public Property ValidationCallback As ValidationDelegate
[C#]
public ValidationDelegate ValidationCallback {get; set;}
[C++]
public: __property ValidationDelegate* get_ValidationCallback();
public: __property void set_ValidationCallback(ValidationDelegate*);
[JScript]
public function get ValidationCallback() : ValidationDelegate;
public function set ValidationCallback(ValidationDelegate);

Property Value

The ValidationDelegate to be called when a validation error occurs.

Remarks

The ValidationDelegate is only called if the DTDValidation or SchemaValidation flags are specified and only during Read(). If no delegate is provided,you will get the middle ground which is entity handling, default attributes, and data typing with no validation errors. The parser will not stop on any kind of validation error. It only stops when it hits a well-formedness error.

Note: A "validation Error" is any error listed in the W3C as "Validity Constraint:". If a given element reports a validity error via this callback because the content model does not match then the rest of the content model for that element is not validated (but it's children are validated). In other words, once the validator reaches the error state for a given element it does not keep reporting more and more errors for that element, it only reports the first error.

See Also

XmlTextReader Class | XmlTextReader Members | System.NewXml Namespace