XML Schema also eliminates the need to learn another language, as it is written in XML, unlike DTD.Another key advantage of XML Schema, is its ability to implement strong typing.To validate an XML document, construct an Xml Reader Settings object that contains an XML schema definition language (XSD) schema with which to validate the XML document. For more information on validating XML documents with LINQ to XML, see How to: Validate Using XSD. Validation Event Handler, New Validation Event Handler(Address Of books Settings Validation Event Handler) Dim books As Xml Reader = Xml Reader. Read() End While End Sub Shared Sub books Settings Validation Event Handler(By Val sender As Object, By Val e As Validation Event Args) If e. An individual schema or a set of schemas (as an Xml Schema Set) can be added to an Xml Schema Set by passing either one as a parameter to the Add method of Xml Schema Set. XML documents can be validated against an XML schema definition language (XSD) schema in an Xml Schema Set. XML documents are validated by the Create method of the Xml Reader class. Schema namespace contains extension methods that make it easy to validate an XML tree against an XSD file when using LINQ to XML. An XML Schema describes the structure of an XML document, just like a DTD.
A Validation Event Handler is added to the Xml Reader Settings object to handle any Warning or Error events raised by errors found during the validation process of both the XML document and the schema. Part of the reason why XML Schema is namespace aware while DTD is not, is the fact that XML Schema is written in XML, and DTD is not.Therefore, XML Schemas can be programmatically processed just like any XML document.Here is an example of a generated diagram software can be downloaded from XSD Diagram is free (GNU open license), doesn't need to be built, and gives an interactive diagram.You just open the file and Add the types you want on the (initially blank) diagram. The Oracle JDeveloper 11g built-in viewer is in my view superior to the one available for Eclipse (which, in addition to other unfavourable comparison points I could only get to install for Indigo but not for Juno).