&安培; oacute;不允许出现在XML文件中,但允许.NET资源文件? [英] ó not allowed in xml file but allowed in .net resource file?

查看:90
本文介绍了&安培; oacute;不允许出现在XML文件中,但允许.NET资源文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我解析了一些.NET资源文件(的.resx)。

i'm parsing a few .net resource files (.resx).

在这,我有这一块的数据:

In that, i have this piece of data:

información

这工作在我的.net应用程序,但是当我尝试加载该文件我的XML文档中

This works in my .net app, but when i try to load this file in my xml document

XDocument xmlDoc = XDocument.Parse(s);

我得到这个错误:

i get this error:

Reference to undeclared entity 'oacute'. 

这是为什么?

推荐答案

&放大器; oacute; 是的命名HTML实体未在XML定义的。

ó is a named HTML entity that is not defined in XML.

XML只定义了一个名为HTML实体(即&放大器的一个子集;放大器; &放大器;者; &放大器; QUOT; &放大器; GT; &放大器; LT; 如果没有记错)。

XML only defines a subset of the named HTML entities (namely &, ', ", > and < if memory serves).

您可以使用数字实体重新presentation来代替:

You can use the numeric entity representation instead:

información

或者十六进制:

información

这篇关于&安培; oacute;不允许出现在XML文件中,但允许.NET资源文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆