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 |
IXMLDOMElement.removeAttributeNode (Visual Basic .NET)
The removeAttributeNode method removes the specified attribute from this element.
Syntax
IXMLDOMAttribute = IXMLDOMElement .removeAttributeNode( DOMAttribute As IXMLDOMAttribute )
Parameters
DOMAttribute
[in] IXMLDOMAttribute object to be removed from this element.
Return Values
Returns the removed element.
Example Code
The following example retrieves the attribute node named "src" and removes it from the specified element node by using the removeAttributeNode method.
Imports interop_msxml
Imports Microsoft.WindowsMediaServices.Interop
On Error GoTo Err
' Declare variables.
Dim Server As New WMSServerClass()
Dim Playlist As IXMLDOMDocument
Dim ElemList As IXMLDOMNodeList
Dim Elem As IXMLDOMElement
Dim Node As IXMLDOMNode
Dim AttNode As IXMLDOMAttribute
' 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.item(0)
' Convert the first node into an IXMLDOMElement object.
Elem = CType(Node, IXMLDOMElement)
' Retrieve and remove the attribute named "src".
AttNode = Elem.getAttributeNode("src")
Elem.removeAttributeNode(AttNode)
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
- IXMLDOMAttribute Object (Visual Basic .NET)
- IXMLDOMElement Object (Visual Basic .NET)
- XML DOM Methods (Visual Basic .NET)
| Previous | Next |