Removes all the nodes from the collection described by the IXMLDOMSelection
.
objXMLDOMSelection.removeAll();
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0"); var oSelection; xmlDoc.setProperty("SelectionLanguage", "XPath"); xmlDoc.async = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode <> 0) { var myErr = xmlDoc.parseError; alert("You have error " + myErr.reason); } else { alert(xmlDoc.xml); oSelection = xmlDoc.selectNodes("//book"); oSelection.removeAll(); alert(xmlDoc.xml); }
objXMLDOMSelection.removeAll
Dim xmlDoc As New Msxml2.DOMDocument50 Dim oSelection As IXMLDOMSelection xmlDoc.setProperty "SelectionLanguage", "XPath" xmlDoc.async = False xmlDoc.Load "books.xml" If (xmlDoc.parseError.errorCode <> 0) Then Dim myErr Set myErr = xmlDoc.parseError MsgBox("You have error " & myErr.reason) Else MsgBox xmlDoc.xml Set oSelection = xmlDoc.selectNodes("//book") oSelection.removeAll MsgBox xmlDoc.xml End If
HRESULT removeAll();
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
Applies to: IXMLDOMSelection