Dim vreader As New XIncludingReader(" the url where the schema is")
Dim resolver As New XmlUrlResolver
Dim i As Integer = 0
Dim fur As Uri
Dim s As Stream
Dim xtext As StreamReader
Dim st As String
vreader.XmlResolver = resolver
If (vreader.Name = "schemaLocation") Then
fur = resolver.ResolveUri(New Uri("….location"), vreader.Value)
If Not fur Is Nothing Then
‘Ok going to get the data from the location
‘the beauty of this thing is if your location is on the file or in a url
‘it will resolve it fine.
s = resolver.GetEntity(fur, Nothing, GetType(Stream))
xtext = New StreamReader(s)
st = xtext.ReadToEnd
Console.WriteLine(st)
End If
End If
No comments:
Post a Comment