Share via


IXMLDOMElement.tagName (C#)

banner art

Previous Next

IXMLDOMElement.tagName (C#)

The tagName property contains the element name.

Syntax

  string = IXMLDOMElement
  .tagName;

Remarks

The property is read-only. It contains the element's name as a string.

Example Code

The following example retrieves the tagName property from the root element.

using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;

// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;
IXMLDOMElement Elem;
String tagName;

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 the root element.
    Elem = Playlist.documentElement;

    // Retrieve the tag name.
    tagName = Elem.tagName;
}
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