Unable to View Source of an XML file using IE7

筅森魡賤 提交于 2019-12-24 06:45:27

问题


I am enhancing our web framework to use web services and one of features I would like is the ability to view XML that has been submitted. I am using our Java servlet to launch a popup and serve the XML and this works - in IE7 I get the expected behaviour when of a nicely formatted and folding view of the XML. The problem is if I select 'View Source' I get a popup saying "The XML source file is unavailable for viewing".

I've used Fiddler to inspect the response headers which I've provided below:

HTTP/1.1 200 OK
Date: Tue, 08 Sep 2009 15:23:56 GMT
Server: Oracle Containers for J2EE
Content-Length: 7835
Set-Cookie: p_session_id=20DB84E0FB3AAE905A0A07C86AD61A1E; Path=/
Set-Cookie: field_set_F2K_iMm34HT1t=fsF2N_iMm34HT1t; Path=/eng8
Cache-Control: private
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
Content-Type: text/xml; charset=UTF-8
Expires: Tue, 08 Sep 2009 15:23:59 GMT

Can anyone explain the reason for the error? I have a feeling it might be to do with caching but I haven't been able to solve it yet. The XML is valid and well formed.


回答1:


This behavior is by design:

PRB: Browsing and Saving the Default MSXML XSL Stylesheet in Internet Explorer



来源:https://stackoverflow.com/questions/1394682/unable-to-view-source-of-an-xml-file-using-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!