Validation Options on XmlReaderSettings Class
The XmlReader class can enforce validation using a document type definition (DTD) or XML Schema definition language (XSD) schema. Settings on the XmlReaderSettings object used by the Create method determine what type of data validation, if any, the XmlReader object supports.
Validation Settings
The following table details the validation-specific settings on the XmlReaderSettings class.
Property |
Description |
---|---|
Specifies whether to allow DTD processing. The default is to disallow DTD processing. |
|
Specifies whether the XmlReader performs data validation, and what type of validation to perform (DTD or schema). The default is no data validation. |
|
Specifies an event handler for receiving information about validation events. If an event handler is not provided, an XmlException is thrown on the first validation error. |
|
Specifies additional validation settings.
|
|
Specifies the XmlResolver used to resolve and access any external resources. This can include external entities (for example, DTD and schema locations). The XmlResolver is also used to process any xs:include or xs:import elements contained in the XML Schema. If an XmlResolver is not specified, the XmlReader uses a default XmlUrlResolver with no user credentials. |
See Also
Concepts
Reading XML with the XmlReader