System.Xml.XmlNamespaceManager.RemoveNamespace Method

Removes the given namespace for the given prefix.

Syntax

public virtual void RemoveNamespace (string prefix, string uri)

Parameters

uri
The namespace to remove for the given prefix. The namespace removed is from the current namespace scope. Namespaces outside the current scope are ignored.
prefix
The prefix for the namespace
uri
The namespace to remove for the given prefix. The namespace removed is from the current namespace scope. Namespaces outside the current scope are ignored.

Exceptions

TypeReason
ArgumentNullException prefix is null, or uri is null.

Remarks

Operation
As described above.

The namespace removed is from the current namespace scope. Namespaces outside the current scope are ignored. If prefix or uri does not exist in the collection, this method simply returns.

Note to Inheritors
Override this method to customize the behavior of this method in types derived from the System.Xml.XmlNamespaceManager class.

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