Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

abort Method (DOMDocument)

Aborts an asynchronous download in progress.

oXMLDOMDocument.abort();

Example

var xmlDoc;
xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
xmlDoc.async = true;
xmlDoc.onreadystatechange = doOnReadyStateChange;
xmlDoc.load("books.xml");
if (xmlDoc.parseError.errorCode != 0) {
   var myErr = xmlDoc.parseError;
   WScript.Echo("You have error " + myErr.reason);
}

function doOnReadyStateChange () {
   if (xmlDoc.readyState == 1) {
      xmlDoc.abort();
   }
}

HRESULT abort(
    void
);

Return Values

S_OK

The value returned if successful.

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).

Implemented in: MSXML 3.0 and MSXML 6.0

Show:
© 2014 Microsoft