mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 07:01:21 +02:00
- fixed xerces crash with version 3 and higher
This commit is contained in:
@@ -144,10 +144,9 @@ XmlNode *XmlIo::load(const string &path, std::map<string,string> mapTagReplaceme
|
|||||||
else {
|
else {
|
||||||
config->setParameter(XMLUni::fgXercesSchema, false);
|
config->setParameter(XMLUni::fgXercesSchema, false);
|
||||||
config->setParameter(XMLUni::fgXercesSchemaFullChecking, false);
|
config->setParameter(XMLUni::fgXercesSchemaFullChecking, false);
|
||||||
//config->setParameter(XMLUni::fgDOMValidateIfSchema, true);
|
config->setParameter(XMLUni::fgXercesLoadExternalDTD, false);
|
||||||
config->setParameter(XMLUni::fgDOMValidate, false);
|
config->setParameter(XMLUni::fgXercesCacheGrammarFromParse, true);
|
||||||
config->setParameter(XMLUni::fgSAX2CoreValidation, true);
|
config->setParameter(XMLUni::fgXercesUseCachedGrammarInParse, true);
|
||||||
config->setParameter(XMLUni::fgXercesDynamic, true);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *document= parser->parseURI(path.c_str());
|
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *document= parser->parseURI(path.c_str());
|
||||||
@@ -165,8 +164,11 @@ XmlNode *XmlIo::load(const string &path, std::map<string,string> mapTagReplaceme
|
|||||||
return rootNode;
|
return rootNode;
|
||||||
}
|
}
|
||||||
catch(const DOMException &ex) {
|
catch(const DOMException &ex) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Exception while loading: [%s], %s\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),XMLString::transcode(ex.msg));
|
char szBuf[8096]="";
|
||||||
throw runtime_error("Exception while loading: " + path + ": " + XMLString::transcode(ex.msg));
|
sprintf(szBuf,"In [%s::%s Line: %d] Exception while loading: [%s], msg:\n%s",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),XMLString::transcode(ex.msg));
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugError,"%s\n",szBuf);
|
||||||
|
|
||||||
|
throw runtime_error(szBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user