System.Xml.XmlNamespaceManager.GetEnumerator Method

Returns an enumerator to use to iterate through the namespaces in the System.Xml.XmlNamespaceManager.

Syntax

public virtual IEnumerator GetEnumerator ()

Returns

An IEnumerator containing the prefixes stored by the System.Xml.XmlNamespaceManager.

Remarks

The following code shows how to use the IEnumerator to view all the namespace pairs stored in the System.Xml.XmlNamespaceManager object.

Example

Dim nsEnum As IEnumerator = nsmgr.GetEnumerator()
Do While nsEnum.MoveNext
  If nsEnum.Current <> "" Then
    MsgBox("xmlns:" + nsEnum.Current + "=" + nsmgr.LookupNamespace(nsEnum.Current))
  End If
Loop

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