The XmlValidatingReader provides an API for validating XML documents against XSD schemas. In many cases a single XML instance document may be validated against a single XSD schema. However, more advanced applications may involve multiple schemas.
This sample application demonstrates how three different sections of an XML instance document can be validated against three different XML schemas (see the "View Source Code" link to view the individual schemas and the instance document) all within different target namespaces. The application leverages the XmlSchemaCollection class along with the XmlValidatingReader to perform the validation.