Hi, I am using the libXML to my xml file. I am using the windows
version of the libXML, which I downloaded from http://www.zlatkovic.com/libxml.en.html. When I use the libXML function “xmlReaderForFile” in a
thread apart from my main thread, it crashes. The function is not called
concurrently too. The below is the code snippet which crashes. Is there anyway
I can fix the crash? Any help would be greatly appritiated. Regards, Jayashree Code Snippet =========== void loadConfiguration(string
urlStr) { xmlTextReaderPtr
reader = NULL; // XML_PARSE_NOCDATA, docs say it merges
CDATA into #text. reader
= xmlReaderForFile(urlStr.c_str(), NULL, XML_PARSE_NOENT | XML_PARSE_NOCDATA); if (reader) { cout<<"SUCESS..."<<endl<<endl; } xmlFreeTextReader(reader); } void loadConfig(void *pData) { loadConfiguration("sampleApp.xml"); } int _tmain(int argc, _TCHAR* argv[]) { loadConfiguration("sampleApp.xml"); _beginthread(
loadConfig, 0, NULL ); getch(); return 0; } |