引用了未声明的实体“NBSP” - 为什么? [英] Reference to undeclared entity 'nbsp' - why?
本文介绍了引用了未声明的实体“NBSP” - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有code以下行:
XDocument formConfiguration = XDocument.Load(ConfigurationManager.AppSettings["XMLFileURL"]);
我得到以下异常消息:
I get the following exception message:
引用了未声明的实体NBSP
Reference to undeclared entity 'nbsp'
有没有&放大器; NBSP;
在XML序列。有没有&安培;
字符的XML。当这哪是哪里来的?
There are no
sequences in the XML. There are no &
characters in the XML. Where could this be coming from?
谢谢, 查尔斯
推荐答案
找到了答案; XDocument.Load工作更好地与文件路径,而不是URL。它的工作原理吧。谢谢大家。
Found the answer; XDocument.Load works better with a file path rather than a URL. It works now. Thanks everyone.
这篇关于引用了未声明的实体“NBSP” - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文