IXMLDOMNamedNodeMap.nextNode (Visual Basic .NET)

The nextNode method returns the next node in the IXMLDOMNamedNodeMap collection.

IXMLDOMNode = IXMLDOMNamedNodeMap.nextNode

Arguments

This method takes no parameters.

Return Value

Returns an IXMLDOMNodeIXMLDOMNode Object (Visual Basic .NET), which refers to the next node in the collection. Returns NULL if there is no next node.

Remarks

The iterator initially points before the first node in the list so that the first call to nextNode returns the first node in the list.

This method returns NULL when the current node is the last node or there are no items in the list. When the current node is removed from the list, subsequent calls to nextNode return NULL. The iterator must be reset by calling the reset method.

This method is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

Example

The following example creates an IXMLDOMNamedNodeMapIXMLDOMNamedNodeMap Object (Visual Basic .NET) and uses its nextNode method to iterate the collection.

Imports interop_msxml
Imports Microsoft.WindowsMediaServices.Interop

On Error GoTo Err

' Declare variables.
Dim Server As New WMSServerClass()
Dim Playlist As IXMLDOMDocument
Dim objNamedNodeMap As IXMLDOMNamedNodeMap
Dim objNode As IXMLDOMNode

' Create a new playlist object.
Set Playlist = Server.CreatePlaylist

' Load a playlist.
Playlist.Load (("file://c:\wmpub\wmroot\simple.wsx"))

' Retrieve the list of attribute nodes in the second child node.
Set objNamedNodeMap = Playlist.documentElement.childNodes(1).Attributes

' Retrieve each node in the list.
For i = 0 To (objNamedNodeMap.length - 1)
  Set objNode = objNamedNodeMap.nextNode
Next
Exit Sub

Err:
' TODO: Handle errors.

Requirements

Reference: Add references to Microsoft.WindowsMediaServices and interop_msxml.

Namespace: Microsoft.WindowsMediaServices.Interop, interop_msxml.

Assembly: Microsoft.WindowsMediaServices.dll, interop_msxml.dll.

Library: WMSServerTypeLib.dll, msxml.dll.

Platform: Windows ServerĀ 2003 family, Windows ServerĀ 2008 family.

See Also

Reference

IXMLDOMNamedNodeMap Object (Visual Basic .NET)

IXMLDOMNode Object (Visual Basic .NET)

Concepts

XML DOM Methods (Visual Basic .NET)