IXMLDOMElement.tagName (Visual Basic .NET)

The tagName property contains the element name.

String = IXMLDOMElement.tagName


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


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

Imports interop_msxml
Imports Microsoft.WindowsMediaServices.Interop

On Error GoTo Err

' Declare variables.
Dim Server As New WMSServerClass()
Dim Playlist As IXMLDOMDocument
Dim Elem As IXMLDOMElement
Dim tagName As String

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

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

' Retrieve the root element.
Set Elem = Playlist.documentElement

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


IXMLDOMElement Object (Visual Basic .NET)


XML DOM Properties (Visual Basic .NET)