Click to Rate and Give Feedback
Properties
 responseXML Property
responseXML Property

Retrieves the response body as an XML Document Object Model (DOM) object.

Syntax

[ oXMLDocument = ] XMLHttpRequest.responseXML

Possible Values

oXMLDocument Object that receives the response body.

The property is read-only. The property has no default value.

Remarks

For properties and methods supported by oXMLDocument , refer to the documentation of IXMLDOMDocument/DOMDocument Members World Wide Web link.

responseXML was introduced in Windows Internet Explorer 7.

Example

The following example uses the XML DOM to display the response body:

var oReq = new XMLHttpRequest();
oReq.open("GET", "http://localhost/books.xml", false);
oReq.send();
alert(oReq.responseXML.xml);

Standards Information

This property is defined in The XMLHttpRequest Object (W3C Working Draft) World Wide Web link.

Applies To

XMLHttpRequest

See Also

responseBody, responseText
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker