responseText Property (ServerXMLHTTP/IServerXMLHTTPRequest)
Collapse the table of content
Expand the table of content

responseText Property (ServerXMLHTTP/IServerXMLHTTPRequest)


Represents the response entity body as a string.

strValue = oServerXMLHTTPRequest.responseText;

var xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.3.0");"GET", "http://localhost/books.xml", false);

strValue = oServerXMLHTTPRequest.responseText

HRESULT get_responseText(VARIANT* pvarVal);

 pvarVal [out, retval]

The response entity body as a string.


The value returned if successful.


The value returned if the data is unavailable.

         ServerXMLHTTP/IServerXMLHTTPRequest tries to decode the response into a Unicode string. It assumes the default encoding is UTF-8, but it can decode any type of UCS-2 (big or little endian) or UCS-4 encoding as long as the server sends the appropriate Unicode byte-order mark. It does not process the <? XML coding declaration. If you know the response is going to be XML, use the responseXML property for full XML encoding support.

This property represents only one of several forms in which the HTTP response can be returned.

Implemented in:

MSXML 3.0, MSXML 6.0


© 2016 Microsoft