Sets the XmlResolver used for resolving DTD references. : XmlResolver « XML « VB.Net






Sets the XmlResolver used for resolving DTD references.

  

Imports System
Imports System.IO
Imports System.Xml
Imports System.Net

public class Sample 

  public shared sub Main() 

    Dim reader as XmlTextReader = new XmlTextReader("http://myServer.com/books.xml")
    Dim resolver as XmlUrlResolver = new XmlUrlResolver()
    resolver.Credentials = CredentialCache.DefaultCredentials
    reader.XmlResolver = resolver

    while (reader.Read()) 
    end while           

    reader.Close()     

  end sub
end class

   
    
  








Related examples in the same category

1.XmlResolver resolves external XML resources named by a Uniform Resource Identifier (URI).
2.Sets the XmlResolver to use for resolving external resources.