问题描述
这是我第一次创建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解析错误:格式不正确?任何人都行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!