"Reference to undeclared entity" when using custom escape characters

I am trying to Deserialize an XML document that contains custom escape characters through included files. These are from a math library used in docbook and defined using ENTITY definitions. An example of which is &mdash for a “-” character. I’m able to bring these files into a generic xml editor and it’s able to read these custom escape characters fine, but running uipath Deserialize XML is giving the error

“Reference to undeclared entity ‘mdash’”

Does the deserialize function not work with included files or is it having problems with the ENTITY definitions and more importantly is there a work around?