Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ó not allowed in xml file but allowed in .net resource file?

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

In that, i have this piece of data:

información

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'. 

Why is that?

like image 502
Michel Avatar asked Dec 01 '25 08:12

Michel


1 Answers

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

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

You can use the numeric entity representation instead:

información

Or, in hexadecimal:

información
like image 143
Frédéric Hamidi Avatar answered Dec 03 '25 22:12

Frédéric Hamidi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!