Share via


IXMLDOMNamedNodeMap.getQualifiedItem (C#)

banner art

Previous Next

IXMLDOMNamedNodeMap.getQualifiedItem (C#)

The getQualifiedItem method returns the attribute with the specified namespace and attribute name.

Syntax

  IXMLDOMNode = IXMLDOMNamedNodeMap
  .getQualifiedItem(
  string strbaseName,
 string strnamespaceURI
);

Parameters

strbaseName

[in] string specifying the base name of the attribute, without namespace qualification.

strnamespaceURI

[in] string specifying the namespace prefix that qualifies the attribute name. It does not matter what value is assigned to this string because the Windows Media Services SDK implementation of the XML DOM does not fully support namespaces.

Return Values

Returns the attribute node specified by the strbaseName and strnamespaceURI parameters. Returns NULL if the attribute is not in the collection or if the item is not an attribute.

Remarks

This method is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

Example Code

The following example uses the getQualifiedItem method to retrieve an attribute node named "src" from a list of attributes contained in an IXMLDOMNamedNodeMap object.

using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;

// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;
IXMLDOMNamedNodeMap oNamedNodeMap;
IXMLDOMNodeList NodeList;
IXMLDOMAttribute nodeAtt;

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

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

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

    // Retrieve an attribute named "src" from the first element
    // named "media".
    NodeList = Playlist.getElementsByTagName("media");
    oNamedNodeMap = NodeList[0].attributes;
    nodeAtt = (IXMLDOMAttribute)oNamedNodeMap.getQualifiedItem("src", "");

}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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