System.Xml.XmlNamespaceManager.HasNamespace Method

Gets a value indicating whether the supplied prefix has a namespace defined for the current pushed scope.

Syntax

public virtual bool HasNamespace (string prefix)

Parameters

prefix
The prefix of the namespace you want to find.

Returns

true if there is a namespace defined; otherwise, false.

Remarks

To determine whether there is a default empty namespace defined, set prefix to String.Empty. A return value of true indicates that there is a default namespace defined in the current scope; false indicates that no default namespace is defined.

Note:

xmlns:x= "" is illegal according to the tp://www.w3.org/TR/REC-xml-names/ recommendation.

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