A validating Xml Reader object is created by passing an Xml Reader Settings object to the Create method of the Xml Reader class that takes an Xml Reader Settings object as a parameter. XPath Class Validating Reader Example Shared Sub Main(By Val args() As String) Try Dim settings As Xml Reader Settings = New Xml Reader Settings() settings.
The Xml Reader Settings object passed as a parameter has a Validation Type property set to and an XML Schema for the XML document contained in the Xml Document object added to its Schemas property.
Load(reader) Dim navigator As XPath Navigator = document.
Create("contoso Books.xml", settings) Dim document As Xml Document = New Xml Document() document.
In the case of validation, you can create an XPath Document object just like you create an Xml Document object using a validating Xml Reader object as described earlier in this topic.