XML System.Xml [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Xml.XmlResolver

Resolves external XML resources named by a URI.

This class is used to resolve external XML resources such as entities, document type definitions (DTDs), or schemas. It is also used to process include and import elements found in Extensible StyleSheet Language (XSL) stylesheets or XML Schema Definition language (XSD) schemas.

This class implements the class.

- Constructor

  Constructs and initializes a new instance of the class.

  To be added.
  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Net.ICredentials

  Sets the credentials used to authenticate Web requests.

  A instance containing the credentials.

  This property is write-only.

  If the virtual directory is configured to allow anonymous access, credentials are not needed and this property does not need to be set. If credentials are needed but not supplied, the class uses default credentials ().

  This property overrides .

  The following example sets credentials for the virtual directory "http://localhost/bookstore/inventory.xml". There is no output from this example.

  `using System; using System.Net; using System.Xml; public class App { public static void Main() { XmlTextReader xtReader = new XmlTextReader("http://localhost/" + "bookstore/inventory.xml"); NetworkCredential netCredential = new NetworkCredential("username", "password", "domain"); XmlUrlResolver xResolver = new XmlUrlResolver(); xResolver.Credentials = netCredential; xtReader.XmlResolver= xResolver; } }`

  The following example associates different credentials with different URIs and adds the credentials to a credential cache. The credentials can then be used to check authentication for different URIs regardless of the original source of the XML. There is no output from this example.

  `using System; using System.Net; using System.Xml; public class App { public static void Main() { XmlTextReader xtReader = new XmlTextReader("http://localhost/" + "bookstore/inventory.xml"); NetworkCredential netCredential1 = new NetworkCredential("username1", "password1", "domain1"); NetworkCredential netCredential2 = new NetworkCredential("username2", "password2", "domain2"); CredentialCache credCache = new CredentialCache(); credCache.Add( new Uri("http://www.contoso.com/"), "Basic", netCredential1); credCache.Add( new Uri("http://app.contoso.com/"), "Basic", netCredential2); XmlUrlResolver xResolver = new XmlUrlResolver(); xResolver.Credentials = credCache; xtReader.XmlResolver= xResolver; } }` 0 1.0.5000.0 2.0.0.0
- Method
  System.Object `` `` `` The returned from . This parameter is not used. or ().

  Maps a URI to an object containing the actual resource that the URI represents.

  A containing the resource, or if is .

  This method overrides .

  is . is not or (). is . 0 1.0.5000.0 2.0.0.0
- Method
  System.Uri `` `` The specifying the base URI used to resolve .

  A specifying the URI to resolve. The URI can be absolute or relative.

  Resolves the absolute URI from the base and relative URIs.

  A containing the absolute URI, or if can not be resolved.

  If is , it is set to .

  The absolute URI can be used as the base URI for any subsequent requests for entities that are relative to this URI.

  This method overrides .

  is . 2.0.0.0
0