Export (0) Print
Expand All

XmlPreloadedResolver Class

Represents a class that is used to prepopulate the cache with DTDs or XML streams.

System.Object
  System.Xml.XmlResolver
    System.Xml.Resolvers.XmlPreloadedResolver

Namespace:  System.Xml.Resolvers
Assembly:  System.Xml (in System.Xml.dll)

public class XmlPreloadedResolver : XmlResolver

The XmlPreloadedResolver type exposes the following members.

  NameDescription
Public methodXmlPreloadedResolver()Initializes a new instance of the XmlPreloadedResolver class.
Public methodXmlPreloadedResolver(XmlKnownDtds)Initializes a new instance of the XmlPreloadedResolver class with the specified preloaded well-known DTDs.
Public methodXmlPreloadedResolver(XmlResolver)Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver.
Public methodXmlPreloadedResolver(XmlResolver, XmlKnownDtds)Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver and preloaded well-known DTDs.
Public methodXmlPreloadedResolver(XmlResolver, XmlKnownDtds, IEqualityComparer<Uri>)Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver, preloaded well-known DTDs, and URI equality comparer.
Top

  NameDescription
Public propertyCredentialsSets the credentials that are used to authenticate the underlying WebRequest. (Overrides XmlResolver.Credentials.)
Public propertyPreloadedUrisGets a collection of preloaded URIs.
Top

  NameDescription
Public methodAdd(Uri, Byte[])Adds a byte array to the XmlPreloadedResolver store and maps it to a URI. If the store already contains a mapping for the same URI, the existing mapping is overridden.
Public methodAdd(Uri, Stream)Adds a Stream to the XmlPreloadedResolver store and maps it to a URI. If the store already contains a mapping for the same URI, the existing mapping is overridden.
Public methodAdd(Uri, String)Adds a string with preloaded data to the XmlPreloadedResolver store and maps it to a URI. If the store already contains a mapping for the same URI, the existing mapping is overridden.
Public methodAdd(Uri, Byte[], Int32, Int32)Adds a byte array to the XmlPreloadedResolver store and maps it to a URI. If the store already contains a mapping for the same URI, the existing mapping is overridden.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEntityMaps a URI to an object that contains the actual resource. (Overrides XmlResolver.GetEntity(Uri, String, Type).)
Public methodGetEntityAsyncAsynchronously maps a URI to an object that contains the actual resource. (Overrides XmlResolver.GetEntityAsync(Uri, String, Type).)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveRemoves the data that corresponds to the URI from the XmlPreloadedResolver.
Public methodResolveUriResolves the absolute URI from the base and relative URIs. (Overrides XmlResolver.ResolveUri(Uri, String).)
Public methodSupportsTypeDetermines whether the resolver supports other Types than just Stream. (Overrides XmlResolver.SupportsType(Uri, Type).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The XmlPreloadedResolver type is used as a resolver when automatic calls to the network are not desired or are not possible. For example, this type can be used for loading cached external DTDs. Or, you might use XmlPreloadedResolver to preload well-known DTDs that are defined in XHTML 1.0. Preloading well-known DTDs does not start any network connections because these DTDs are already embedded in the System.Xml.Utils assembly. Currently, XmlPreloadedResolver includes the DTDs that are defined in XHTML 1.0 and RSS 0.91.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft