Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IXMLDOMAttribute.value (Visual Basic .NET)
The value property contains the attribute value.
Syntax
Variant = IXMLDOMAttribute.value IXMLDOMAttribute.value = Variant
Remarks
The property is read/write. It returns the value of the attribute.
Example Code
The following example retrieves the value of the first attribute of the document root and assigns it to the variable myVar.
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 myVar As Variant
' 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
' Assign the value from the first attribute of the
' root element to the variable myVar.
myVar = root.firstChild.Attributes.Item(0).Value
' Display the variable.
MsgBox myVar
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 |