GetEnumerator Method
Collapse the table of content
Expand the table of content

XmlNamespaceManager.GetEnumerator Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

'Declaration
Public Overridable Function GetEnumerator As IEnumerator

Return Value

Type: System.Collections.IEnumerator
An IEnumerator containing the prefixes stored by the XmlNamespaceManager.

Implements

IEnumerable.GetEnumerator

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

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft