responseXML Property (IXMLHTTPRequest)
TOC
Collapse the table of content
Expand the table of content

responseXML Property (IXMLHTTPRequest)

 

Represents the parsed response entity body.

var objDispatch = oXMLHttpRequest.responseXML;

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
xmlhttp.open("GET", "http://localhost/books.xml", false);
xmlhttp.send();
WScript.Echo(xmlhttp.responseXML.xml);

Set objDispatch = oXMLHttpRequest.responseXML

HRESULT get_responseXML(IDispatch** ppBody);

 ppBody[out, retval]

The response entity body as an XML document.

S_OK

The value returned if successful.

E_PENDING

The value returned if the data is unavailable.

The property is read-only. For security reasons, the parser validation features are always turned off to prevent Microsoft® XML Core Services (MSXML) from attempting to download a document type definition (DTD) or XML-Data definition. If the response entity body is not valid XML, this property returns DOMDocument that was parsed so that you can access the error. This property does not return IXMLDOMParseError itself, but it is accessible from DOMDocument.

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 one of the supported MIME types using the ASP method Response.ContentType then responseXML will be empty.

The supported MIME types for MSXML 6.0 are: "text/xml", "application/xml" or anything that ends with "+xml", for example "application/rss+xml".

The supported MIME types for MSXML 3.0 are: "text/xml" and "application/xml".

Implemented in: MSXML 3.0, MSXML 6.0

         IXMLHTTPRequest       

Show:
© 2016 Microsoft