IXMLDOMAttribute.name (Visual Basic .NET)
Previous | Next |
IXMLDOMAttribute.name (Visual Basic .NET)
The name property contains the attribute name.
Syntax
String = IXMLDOMAttribute.name
Remarks
The property is read-only. It returns the name of the attribute. The value is the same as the value of nodeName property.
Example Code
The following example creates an IXMLDOMAttribute object from the first attribute of the root, and then displays its name.
Imports interop_msxml Imports Microsoft.WindowsMediaServices.Interop On Error GoTo Err ' Declare variables. Dim Server As New WMSServerClass() Dim Playlist As IXMLDOMDocument Dim root As IXMLDOMElement Dim objDOMatt As IXMLDOMAttribute ' 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 root = Playlist.documentElement ' Display the first attribute name of the first child. Set objDOMatt = root.firstChild.Attributes.Item(0) MsgBox objDOMatt.Name 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 |