Share via


IXMLDOMNamedNodeMap.reset (C#)

banner art

Previous Next

IXMLDOMNamedNodeMap.reset (C#)

The reset method resets the iterator in the collection of attribute nodes.

Syntax

  IXMLDOMNamedNodeMap
  .reset();

Parameters

This method takes no parameters.

Return Values

This method does not return a value.

Remarks

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

Example Code

The following example uses the reset method to reset the iterator in the list of attributes so that the nextNode method will return the first node in the list.

using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;

// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;
IXMLDOMNodeList NodeList;
IXMLDOMNode NextNode;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Create a new playlist object.
    Playlist = Server.CreatePlaylist();

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

    // Retrieve all the elements with the tag name "media".
    NodeList = Playlist.getElementsByTagName("media");

    // Reset the iterator of the first node in the list so that 
    // the following call to nextNode() returns the first node 
    // in the list.
    NodeList[0].attributes.reset();
    NextNode = NodeList[0].attributes.nextNode();
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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

Previous Next