IXMLDOMNamedNodeMap.nextNode (Visual Basic .NET)

banner art

Previous Next

IXMLDOMNamedNodeMap.nextNode (Visual Basic .NET)

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




This method takes no parameters.

Return Values

Returns an IXMLDOMNode object, which refers to the next node in the collection. Returns NULL if there is no next node.


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 Code

The following example creates an IXMLDOMNamedNodeMap object 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
Exit Sub

' TODO: Handle errors.


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

Previous Next