Html 'XML5619:文档语法不正确。' 错误仅在 IE10 中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15360918/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 06:21:19  来源:igfitidea点击:

'XML5619: Incorrect document syntax. ' error in IE10 Only

xmlhtmlinternet-explorerinternet-explorer-10

提问by streetlight

I've been noticing during some IE10 testing that I keep running into the following error:

我在一些 IE10 测试中注意到我一直遇到以下错误:

XML5619: Incorrect document syntax. 

However, I'm not using XML explicitly, and I can't seem to find documentation as to what this error actually means. I'm using the HTML5 doctype, if that matters.

但是,我没有明确使用 XML,而且我似乎无法找到有关此错误实际含义的文档。如果重要的话,我正在使用 HTML5 文档类型。

Can anyone out there with IE expertise help lead me in the right direction?

任何拥有 IE 专业知识的人都可以帮助我朝着正确的方向前进吗?

采纳答案by Melad

set the content-type of you're request to text/xmland the error will disappear.

将您请求的内容类型设置为text/xml,错误就会消失。

I think IE10 expects the content-type to be set. Check Developer tools -> Network -> Start capturing what type your request is.

我认为 IE10 期望设置内容类型。检查开发人员工具 -> 网络 -> 开始捕获您的请求类型。

For Ext.Ajax.requestset the content-type to application/json.

对于Ext.Ajax.request设置的内容类型application/json

回答by Aravind Cheekkallur

XML5619: Incorrect document syntax.

XML5619:文档语法不正确。

Above issue throws in IE because the Content-Typewont be there in the response header. To cross check the same, Open Developer Tools >Network check Content-Type for the request that will be black. IE expect Content-Type for every response data. To solve this issue set the content type for the response

上面的问题在 IE 中引发,因为Content-Type不会出现在响应标头中。要交叉检查相同的内容,请打开开发人员工具>网络检查内容类型以查找将是黑色的请求。IE 期望每个响应数据的 Content-Type。要解决此问题,请设置响应的内容类型