Xml validating reader example
You can validate the data against a DTD, an inline XSD Schema, or an XSD Schema stored in an Xml Schema Set object (a cache); these scenarios are described on the Create reference page.
The Read State property value indicates the current state of the XML reader. (See the W3C XML Schema Part 1: Structures and the W3C XML Schema Part 2: Datatypes recommendations.) Therefore, although all valid XML documents are well formed, not all well-formed XML documents are valid.
The following table lists the methods and properties that the Xml Reader class provides for processing elements.
After the Xml Reader is positioned on an element, the node properties, such as Name, reflect the element values.
Async = True Using reader As Xml Reader = Xml Reader. The Validation Event Handler is used for notification.
When this property is set to turns off character checking for character entity references.
If the reader is processing text data, it always checks that XML names are valid, regardless of this setting.
Conforms to the rules for a well-formed XML 1.0 document.- Fragment.
Conforms to the rules for a well-formed document fragment that can be consumed as an external parsed entity.- Auto. If the data isn't in conformance, an Xml Exception exception is thrown.