次の方法で共有


abort Method (DOMDocument)

 

Aborts an asynchronous download in progress.

JScript Syntax

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();  
   }  
}  

C/C++ Syntax

HRESULT abort(  
    void  
);  

Return Values

S_OK
The value returned if successful.

Remarks

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

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

Applies to

IXMLDOMDocument-DOMDocument

See Also

IXMLDOMParseError
readyState Property (DOMDocument)