System.Xml Namespace

Interfaces
IXmlUriResolver

Represents an interface that resolves Uniform Resource Identifiers (URIs) to a new URI.

Summary

The IXmlUriResolver interface is used to resolve relative URIs to absolute URIs. This is particularly useful when processing XML documents that might reference external resources using relative paths.

Members

Methods

System.Uri ResolveUri( System.Uri baseUri, string relativeUri )

Resolves a relative URI to an absolute URI.

Parameters

  • baseUri: The base URI to resolve the relative URI against.
  • relativeUri: The relative URI to resolve.

Returns

An absolute System.Uri object representing the resolved URI.

Requirements

Namespace:System.Xml

Assembly:System.Xml.dll

Remarks

Implementations of this interface can provide custom logic for URI resolution, allowing for scenarios like:

  • Resolving relative paths from a specific application base directory.
  • Handling custom URI schemes.
  • Caching resolved URIs for performance.

The .NET Framework provides a default implementation of IXmlUriResolver that can be used in most common scenarios.

See Also