The XML parser used by Civ4 is really annoying. It has a lot of quirks that are showing again now when I work on reading in the texts in UTF8 (but still trying to keep compatibility to a text XML that uses Latin-1).
So I would suggest replacing the XML parser. To avoid having to rewrite all the current reading code, the idea is to imitate the abstract reading interface that is currently provided by CvDLLXmlIFaceBase by implementing it in a new singleton class inheriting from it and then replacing all the references to gDLL->getXMLIFace() with references to the singleton. That can be done with an automatic replace in a text editor.
One result of that change would be that the schemas would be ignored (for good or bad) since those schemas are specific to older Microsoft parsers and any replacement parser would likely not support them.
On the other hand XML reading would likely be a lot faster.
What do you think?
So I would suggest replacing the XML parser. To avoid having to rewrite all the current reading code, the idea is to imitate the abstract reading interface that is currently provided by CvDLLXmlIFaceBase by implementing it in a new singleton class inheriting from it and then replacing all the references to gDLL->getXMLIFace() with references to the singleton. That can be done with an automatic replace in a text editor.
One result of that change would be that the schemas would be ignored (for good or bad) since those schemas are specific to older Microsoft parsers and any replacement parser would likely not support them.
On the other hand XML reading would likely be a lot faster.
What do you think?