Share via


IXMLDOMNode.nodeTypeString (Visual Basic .NET)

banner art

Previous Next

IXMLDOMNode.nodeTypeString (Visual Basic .NET)

The nodeTypeString property returns the node type in string form.

Syntax

  String = IXMLDOMNode.nodeTypeString

Remarks

The property is read-only. It contains the string version of the node type. To return the enumeration value, use the nodeType property.

The value of the string returned depends on the type of node on which the nodeTypeString property is called, as shown in the following table. For example, if the node type is NODE_ELEMENT, a string is returned containing the word "element".

Node type Value returned
NODE_ATTRIBUTE Returns "attribute".
NODE_COMMENT Returns "comment".
NODE_DOCUMENT Returns "document".
NODE_ELEMENT Returns "element".
NODE_PROCESSING_INSTRUCTION Returns "processinginstruction".
NODE_TEXT Returns "text".

Example Code

The following example creates an IXMLDOMNode object and displays its node type in string form, in this case, "element".

Imports interop_msxml
Imports Microsoft.WindowsMediaServices.Interop

On Error GoTo Err

' Declare variables.
Dim Server As New WMSServerClass()
Dim Playlist As IXMLDOMDocument
Dim currNode As IXMLDOMNode

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

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

' Retrieve the first child node of the root element and 
' display its node type as a string.
Set currNode = Playlist.documentElement.childNodes.Item(0)
MsgBox currNode.nodeTypeString
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

Previous Next