Re: [xml] xmlReaderForFile Crashes.. Need immediate help..
From: jwert ilstechnology com
To: "Kali, Jayashree" <jayashree kali wachovia com>
Cc: xml gnome org, xml-bounces gnome org
Subject: Re: [xml] xmlReaderForFile Crashes.. Need immediate help..
Date: Wed, 28 Feb 2007 08:21:35 -0500
Jayashree,
Here is a link about using libxml2 in
threads: http://www.xmlsoft.org/threads.html
I think if you call xmlInitParser()
in main before creating your thread
you will be ok, otherwise your sample looks ok.
Thanks,
Jim
"Kali, Jayashree"
<jayashree kali wachovia com> Sent by: xml-bounces gnome org
02/27/2007 02:40 PM
To
<xml gnome org>
cc
Subject
[xml] xmlReaderForFile Crashes.. Need
immediate help..
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;
}