Validating xsd file
The Xml Document class validates the XML data as it is loaded into the DOM when a validating Xml Reader is passed to the Load method of the Xml Document class. Create("contoso Books.xml", settings) ' The Xml Document validates the XML document contained ' in the Xml Reader as it is loaded into the DOM. After successful validation, schema defaults are applied, text values are converted to atomic values as necessary, and type information is associated with validated information items. Dim document As Xml Document = New Xml Document() document. for establishing validation stages or to provide different validators for different "validation audiences". Since version 2.0, lxml.etree features pre-ISO-Schematron support, using the class lxml.etree. As a result, typed XML data replaces previously untyped XML data. Load(reader) ' Make an invalid change to the first and last ' price elements in the XML document, and write ' the Xml Schema Info values assigned to the price ' element during load validation to the console.
Apart from the built-in DTD support in parsers, lxml currently supports three schema languages: DTD, Relax NG and XML Schema.The Xml Document class does not validate the XML in the Document Object Model (DOM) against an XML Schema definition language (XSD) schema or document type definition (DTD) by default; the XML is only verified to be well-formed.