System.Xml.XmlResolver.ResolveUri Method

When overridden in a derived class, resolves the absolute URI from the base and relative URIs.

Syntax

public virtual Uri ResolveUri (Uri baseUri, string relativeUri)

Parameters

baseUri
The base URI used to resolve the relative URI.
relativeUri
The URI to resolve. The URI can be absolute or relative. If absolute, this value effectively replaces the baseUri value. If relative, it combines with the baseUri to make an absolute URI.

Returns

A Uri representing the absolute URI or null if the relative URI cannot be resolved.

Exceptions

TypeReason
System.Xml.XmlException baseUri and relativeUri are null.
System.Xml.ArgumentException baseUri and relativeUri are null.

Remarks

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

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0