Process XML in C# using external entity file

Posted by Ryan Berger on Stack Overflow See other posts from Stack Overflow or by Ryan Berger
Published on 2011-02-09T15:12:49Z Indexed on 2011/02/09 15:25 UTC
Read the original article Hit count: 357

Filed under:
|
|

I am processing an XML file (which does not contain any dtd or ent declarations) in C# that contains entities such as é and à. I receive the following exception when attempting to load an XML file...

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(record);

Reference to undeclared entity 'eacute'.

I was able to track down the proper ent file here. How do I tell XmlDocument to use this ent file when loading my XML file?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Xml