Resolves external XML resources named by a Uniform Resource Identifier (URI). : XmlUrlResolver « XML « VB.Net






Resolves external XML resources named by a Uniform Resource Identifier (URI).

  

Option Strict On
Option Explicit On

Imports System
Imports System.Net

Imports System.IO
Imports System.Xml

Public Class Sample

    Public Shared Sub Main()
        Dim resolver As New XmlUrlResolver()
        resolver.Credentials = CredentialCache.DefaultCredentials

        Dim settings As New XmlReaderSettings()
        settings.XmlResolver = resolver
        Dim reader As XmlReader = XmlReader.Create("http://serverName/data/books.xml", settings)

    End Sub
End Class

   
    
  








Related examples in the same category