问题描述
这是我第一次创建 xml 文档,但我遇到了一行无法正常工作的问题.谁能告诉我我做错了什么.
This is my first time creating a xml document but I am having problems with one line not working. can anyone tell me what I have done wrong.
http://www.ncerttext.in/flipkart.xml错误是
7:107 实体wgtid"已被引用,但未声明.
7: 107 The entity "wgtid" was referenced, but not declared.
我该怎么做.
推荐答案
正如@Marco Forberg 所建议的,您的XML 中有问题的字符是"&"
.只需将 &
更改为 &
.
As suggested by @Marco Forberg, the problematic character in your XML is "&"
. Simply change &
to &
.
顺便说一句:现代浏览器会告诉您一些有关 XML 文件的信息,即使它们格式不正确.例如,如果您使用最新版本的 Firefox 打开文件,点击 Ctrl+U
并将鼠标悬停在红色字符上,它会通知您 &
是不允许的,并且应该最有可能更改为 &
.
By the way: Modern browsers tell you something about XML files even if they are malformed. For example, if you open your file with a recent version of Firefox, hit Ctrl+U
and hover over the red character, it informs you that &
is not allowed and should most probably be changed to &
.
这篇关于XML 解析错误:格式不正确?任何人都行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!