Compartilhar via


responseXML Property (ServerXMLHTTP-IServerXMLHTTPRequest)

 

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

Script Syntax

var objDispatch = oServerXMLHttpRequest.responseXML;  

Example

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

Visual Basic Syntax

Set objDispatch = oServerXMLHttpRequest.responseXML  

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.

Versioning

Implemented in:

MSXML 3.0, MSXML 6.0

Applies to

IServerXMLHTTPRequest-ServerXMLHTTP

See Also

IXMLDOMDocument-DOMDocument
IXMLDOMParseError
responseBody Property (ServerXMLHTTPRequest-IServerXMLHTTPRequest)
responseStream Property (ServerXMLHTTP-IServerXMLHTTPRequest)
responseText Property (ServerXMLHTTP-IServerXMLHTTPRequest)