在浏览器中显示xml,无需警告消息 [英] Display xml in browser without warning message
问题描述
我有一个我在iframe中显示的xml文件,但它给了我一个警告:这个XML文件没有任何与之相关的样式信息,文档树如下所示。
I have an xml file that I am displaying in an iframe, but it gives me a warning that "This XML file does not appear to have any style information associated with it. The document tree is shown below."
当我在此xml中添加样式表信息时,它只会显示标签内的数据。
When I add style sheet information on this xml it will show only data inside of tag.
如何显示它以正常的方式没有警告信息。
How can I show it in a normal way without warning message.
在此先感谢您。
Thanks in advance.
推荐答案
<首先将XML文件重命名为.txt。
Rename the XML file to .txt first.
XML文件应该被解释,而不是以原始格式显示。 (他们不需要;在正常情况下,您可以通过单击查看源代码来查看XML源代码。)如果要按原样显示文件,则该文件应该是纯文本文件。
XML files are supposed to be interpreted, not displayed in their raw form. (They don't need to; under normal circumstances, you can always see the XML source by clicking "View Source".) If you want to display a file as is, the file should be a plain text file.
这篇关于在浏览器中显示xml,无需警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!