ondataavailable Property

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

ondataavailable Property

Specifies the event handler for the ondataavailable event.

[Script]

Script Syntax

oXMLDOMDocument.ondataavailable = funcMyEventHandler;
[Visual Basic]

Visual Basic Syntax

objXMLDOMDocument.ondataavailable = value

Private WithEvents XmlDoc As Msxml2.DOMDocument
Private Sub XmlDoc_ondataavailable()
[C/C++]

C/C++ Syntax

HRESULT put_ondataavailable(
    VARIANT ondataavailableSink);

Parameters

ondataavailableSink [in]
Name of the function that should be called when the readyState property value changes to the value INTERACTIVE, indicating that data is available.

C/C++ Return Values

S_OK
Value returned if successful.

Remarks

The property is write-only. When handling asynchronous data, it is useful to be able to start processing in parallel with the download as soon as data becomes available. The ondataavailable event fires each time a new chunk of data arrives. The readyState property defines several states that specify the current status of the asynchronous download.

You can call QueryInterface method of the DOMDocument to obtain IConnectionPointContainer, which is used in event management. The DISPID for this event is DISPID_XMLDOMEVENT_ONDATAAVAILABLE.

This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

ondataavailable Event | readyState Property

Applies to: DOMDocument