IE9开发人员工具栏XML5602:意外的输入结束

时间:2012-10-04 17:23:45

标签: internet-explorer

开发人员工具栏会向我发送XML5602: Unexpected end of input. , line 1 character 175,但我无法提及问题发生的地方。 如何调试这样的错误?

enter image description here

2 个答案:

答案 0 :(得分:1)

它也可能在你的stylehseet!引用您的Web环境不喜欢的SVG样式。我有以下SVG背景与我的SharePoint环境中的“表单”元素相关联...

CSS:

.my-button {
background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZX");

background: -moz-linear-gradient(top,  #eeeeee 0%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#ffffff));
background: -webkit-linear-gradient(top,  #eeeeee 0%,#ffffff 100%);
background: -o-linear-gradient(top,  #eeeeee 0%,#ffffff 100%);
background: -ms-linear-gradient(top,  #eeeeee 0%,#ffffff 100%);
background: linear-gradient(to bottom,  #eeeeee 0%,#ffffff 100%);
}

当我拿出那个svg + xml行时,IE恢复正常。希望这可以帮助别人,特别是如果你像我一样做很多前端编码。

答案 1 :(得分:0)

我能够通过打开无效的xml文件来重现此问题。具体如下:

<?xml version="1.0" encoding="utf-8" ?>
<root>
  <value example="true" />

在上面的例子中,我“忘记”关闭。

如果您在浏览器中打开它,则不会出现此错误:

<?xml version="1.0" encoding="utf-8" ?>
<root>
  <value example="true" />
</root>

简而言之:您忘记在某处关闭标记了!