Aborts an asynchronous download in progress.
oXMLDOMDocument.abort();
var xmlDOM;
xmlDOM = new ActiveXObject("Msxml2.DOMDocument50");
xmlDOM.async = true;
xmlDOM.onreadystatechange = doOnReadyStateChange;
xmlDOM.load("books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myErr = xmlDoc.parseError;
alert("You have error " + myErr.reason);
}
function doOnReadyStateChange () {
if (xmlDOM.readyState == 1) {
xmlDOM.abort();
}
}
oXMLDOMDocument.abort
Dim WithEvents xmlDOM As Msxml2.DOMDocument50
Private Sub cmddoAbortDOMDocument_Click()
Set xmlDOM = New Msxml2.DOMDocument50
xmlDOM.async = True
xmlDOM.Load "books.xml"
If (xmlDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xmlDoc.parseError
MsgBox("You have error " & myErr.reason)
End If
End Sub
Private Sub xmlDOM_onreadystatechange()
If xmlDOM.readyState = 1 Then
xmlDOM.abort
End If
End Sub
HRESULT abort(
void
);
This method stops download and parsing and discards any portion of the XML tree already built. IXMLDOMParseError indicates that the download was stopped.
If the readyState property has the value COMPLETED, no action is taken and the current document is unchanged.
This member is an extension of the Worldwide Web Consortium (W3C) Document Object Model (DOM).
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.
IXMLDOMParseError | readyState Property (DOMDocument)
Applies to: DOMDocument