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.
The removeAttributeNode method removes the specified attribute from this element.
IXMLDOMAttribute = IXMLDOMElement.removeAttributeNode(
IXMLDOMAttribute DOMAttribute
);
Arguments
DOMAttribute |
[in] IXMLDOMAttributeIXMLDOMAttribute Object (C#) to be removed from this element. |
Return Value
Returns the removed element.
Example
The following example retrieves the attribute node named "src" and removes it from the specified element node by using the removeAttributeNode method.
using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;
// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;
IXMLDOMNodeList ElemList;
IXMLDOMElement Elem;
IXMLDOMNode Node;
IXMLDOMAttribute AttNode;
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 a list of nodes that matches the query.
ElemList = Playlist.getElementsByTagName("media");
// Retrieve the first node in the list.
Node = ElemList[0];
// Box the first node into an IXMLDOMElement object.
Elem = (IXMLDOMElement)Node;
// Retrieve and then remove the attribute named "src".
AttNode = Elem.getAttributeNode("src");
Elem.removeAttributeNode(AttNode);
}
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.