Removes the specified child node from the list of children and returns it.
Syntax
objXMLDOMNode = oXMLDOMNode.removeChild(oldChild)
Parameters
- oldChild
- Object. Child node to be removed from the list of children of this node.
Returns
Object. Returns the removed child node.
Example
The following VBScript example creates an XMLDOMNode object (currNode), removes a child node from it, and displays the text of the removed node:
Dim xmlDoc Dim root Set xmlDoc = CreateObject("microsoft.xmldom") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set root = xmlDoc.documentElement Set currNode = root.childNodes.item(1) Set oldChild = currNode.removeChild(currNode.childNodes.item(1)) MsgBox oldChild.text
Applies To