BUG: URL Property on XMLHTTPRequest's ResponseXML Is Not Set

Article translations Article translations
Article ID: 234460 - View products that this article applies to.
This article was previously published under Q234460
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When you use the XMLHTTPRequest object to obtain XML data from another server, the responseXML's URL property comes up blank.

RESOLUTION

If you want to refer to the URL from which the XML is downloaded, keep a variable with the URL parameter that you supplied to XMLHTTPRequest's open() method. In cases in which the original request redirects to another URL, there is no way to discover the value of the "final" URL in the redirection chain.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Save the following XML file as XmlFile.xml on the root folder of your Web server:
    <?xml version="1.0">
    
    <parent>
    
    <child>
    	<grandchild/>
    </child>
    
    <child>
    	<grandchild/>
    </child>
    
    </parent>
    					
  2. Save the following HTML file as TestXMLURL.htm on your Web server:
    <html>
    
    <head>
    <title>XMLHTTPRequest responseXML.url Test</title>
    
    <SCRIPT>
    
    function loadXML() {
    	var x = new ActiveXObject("Microsoft.XMLHTTP");
          //Use the version dependent PROGID 
          //MSXML2.DOMDocument.4.0 if you wish to create and use
          //an MSXML 4.0 DOMDocument object to load the XML
    	x.open("GET", "/xmlFile.xml", false);
    	x.send();
    	window.alert("URL is " + x.responseXML.url);
    }
    
    </SCRIPT>
    
    </head>
    
    <body onload="loadXML();">
    
    
    </body>
    
    </html>
    					
  3. Load the HTML file in Internet Explorer. A message box appears that says only, "URL is ".

REFERENCES

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
http://msdn.microsoft.com/ie/

http://support.microsoft.com/iep

Properties

Article ID: 234460 - Last Review: February 21, 2014 - Revision: 3.0
APPLIES TO
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 4.01 Service Pack 2
  • Microsoft Internet Explorer 4.01 Service Pack 1
  • Microsoft Internet Explorer 4.01 Service Pack 2
  • Microsoft Internet Explorer 5.0
  • Microsoft Internet Explorer 5.01
  • Microsoft Internet Explorer 5.5
  • Microsoft XML Parser 2.0
  • Microsoft XML Parser 2.5
  • Microsoft XML Parser 3.0
  • Microsoft XML Parser 3.0 Service Pack 1
  • Microsoft XML Core Services 4.0
Keywords: 
kbnosurvey kbarchive kbbug kbnofix KB234460

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com