System xml xmlvalidatingreader is obsolete

The xml String I am passing into the function is the raw xml which is referencing the XSD schema.

Validation Event Handler, Address Of Validation Call Back Try While (xmlvread.

NET Framework 2.0, we recommend that you use the Xml Reader Settings class and the Create method to create a validating XML reader. Note The Xml Validating Reader class is obsolete in . You can create a validating Xml Reader instance by using the Xml Reader Settings class and the Create method.

Close() End If End Try End Sub ' Main End Class ' Sample Note The Xml Validating Reader class is obsolete in . You can create a validating Xml Reader instance by using the Xml Reader Settings class and the Create method.reader = New Xml Validating Reader(txtreader) reader. The entity replacement text is 'then parsed and returned as a child node. i wrote a function (see below), but i am not sure as this will be the exact replica of what it's suppose to do. I am trying to find an alternative to the following function, which is using the obsolete How can I adapt this code to work with XMLReader, which is what Visual Studio is suggesting as an alternative? 'VALIDATE XML Public Shared Function validate Xml(By Val xml String As String) As Xml Document xml Error Str = "" Dim str Reader As New String Reader(xml String) Dim xmlr As New Xml Text Reader(str Reader) Dim xmlvread As New Xml Validating Reader(xmlr) ' Set the validation event handler Add Handler xmlvread.

Leave a Reply