PRB: XML Viewer Not Used for XML file

ID: Q234207


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) version 5.0


SYMPTOMS

When navigating to an XML file, Internet Explorer does not display the XML in the browser with the default XML viewer.


CAUSE

The Web server and the XML file are not specifying enough information for Internet Explorer to detect that the file contains XML text.


RESOLUTION

At least one of the following is required for Internet Explorer to correctly detect that a file contains XML text and display the file in the built-in XML viewer:

  • The server-specified HTTP Content-Type header is equal to "text/xml".


  • The file ends in an .xml extension.


  • The beginning of the file contains the standard XML declaration beginning "<?xml".


To resolve this problem, make sure that the XML resource follows one of these points.

Active Server Pages (ASP) pages that return XML information can easily return the correct content type using the ContentType property of the Response object:

<%Response.ContentType = "text/xml"%> 
This line of code must be added to the absolute top of the ASP page.

A standard XML declaration could look like the following:
<?xml version="1.0" ?> 

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Jason Strayer, Microsoft Corporation

Additional query words: XML

Keywords : kbGrpInet kbIE500 kbXML kbDSupport
Version : WINDOWS:5.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: November 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.