Xmlvalidatingreader is obsolete use xmlreader
After an exception is thrown the state of the reader is not predictable. You can create a validating Xml Reader instance by using the Xml Reader Settings class and the Create method.
For example, the reported node type may be different than the actual node type of the current node. For more information, see the Remarks section of the Xml Reader reference page.
This property gives the reader access to the cache of schemas and allows it to validate without having to re-load schemas every time.Warning) that indicate that no schema information is available.Represents a reader that provides document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) validation. The Xml Resolver is also used to handle any import or include elements found in XML Schema definition language (XSD) schemas.string my Xml = " engwar, The Xml Validating Reader (which is obsolete, you should use the Create method on the Xml Reader class to create an Xml Reader to do this for you) derives from Xml Reader. NET/C# MVP] - email@example.com."engwar" The title says it all. The reason I want to avoid the readers is that I want an Xml Document that is not forward-only so I can loop through the doc again after validating it.You can pass this reader to the Load method of the Xml Document class when it loads and have the reader do the validation for you. I want to do something like the following but I keep getting the error "the Xml Schema Set on the document is either null or has no schemas in it.