Sets the XmlResolver used for resolving DTD references.
using System; using System.IO; using System.Xml; using System.Net; public class Sample { public static void Main() { XmlTextReader reader = new XmlTextReader("http://myServer/data/books.xml"); XmlUrlResolver resolver = new XmlUrlResolver(); resolver.Credentials = CredentialCache.DefaultCredentials; reader.XmlResolver = resolver; while (reader.Read()) { } reader.Close(); } }