IXMLDOMAttribute.value (C#)

banner art

Previous Next

IXMLDOMAttribute.value (C#)

The value property contains the attribute value.


  object = IXMLDOMAttribute.value;
IXMLDOMAttribute.value = object;


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.

using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;

// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;
IXMLDOMElement Root;
object myVar;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Create a new playlist object.
    Playlist = Server.CreatePlaylist();

    // Load a playlist.

    // Retrieve the root element.
    Root = Playlist.documentElement;

    // Assign the value from the first attribute of the 
    // root element to the variable myVar.
    myVar = ((IXMLDOMAttribute)Root.firstChild.attributes[0]).value;

    // Display the variable.
catch (Exception e) {
    // TODO: Handle exceptions.


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