responseXML Property (ServerXMLHTTP/IServerXMLHTTPRequest)

MSXML 5.0 SDK

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

responseXML Property (ServerXMLHTTP/IServerXMLHTTPRequest)

Represents the response entity body as parsed by Microsoft® XML Core Services (MSXML) 5.0 for Microsoft Office.

[Script]

Script Syntax

var objDispatch = oServerXMLHttpRequest.responseXML;

Example

var xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.5.0");
xmlServerHttp.open("GET", "http://localhost/sample.xml", false);
xmlServerHttp.send();
alert(xmlServerHttp.responseXML.xml);
[Visual Basic]

Visual Basic Syntax

Set objDispatch = oServerXMLHttpRequest.responseXML

Example

Dim xmlServerHttp As New Msxml2.ServerXMLHTTP50
xmlServerHttp.open "GET", "http://localhost/sample.xml", False
xmlServerHttp.send
MsgBox xmlServerHttp.responseXML.xml
[C/C++]

C/C++ Syntax

HRESULT get_responseXML(IDispatch** ppXmlDom);

Parameters

ppXmlDom [out, retval]
The response entity body as an XML document.

C/C++ Return Values

S_OK
The value returned if successful.
E_PENDING
The value returned if the data is unavailable.

Remarks

For security reasons, the parser validation features are always turned off to prevent MSXML from attempting to download a document type definition (DTD) or XML-Data definition.

If the response entity body is not valid XML, this method returns the DOMDocument object that was parsed so that you can access the error object. This property does not return the error object IXMLDOMParseError itself. That object is accessible from the DOMDocument object.

If the response was generated by an Active Server Pages (ASP) page and the Multipurpose Internet Mail Extension (MIME) type was not correctly set to "text/xml" or "application/xml" using the ASP method Response.ContentType, responseXML will be empty.

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

DOMDocument | IXMLDOMParseError | responseBody Property | responseStream Property | responseText Property

Applies to: IServerXMLHTTPRequest/ServerXMLHTTP