[xml] Opening same xml file in two threads at a time using xmlReadfile/xmlParseFile
- From: Bhadraji D <bhadraji d allaboutif com>
- To: xml gnome org
- Subject: [xml] Opening same xml file in two threads at a time using xmlReadfile/xmlParseFile
- Date: Wed, 3 Feb 2010 17:38:01 +0530
Hi ,
I am using libxml2 parser API for parsing xml file ,when I am trying to open
the same xml file in two threads at a time using xmlReadfile/xmlParseFile,
randomly I am getting following errors:
1) I/O warning : failed to load external entity "/tmp/youtube/2.xml" *and
Document empty error* ( Actually the file exists there and first thread is
using it)
2)/tmp/youtube/2.xml:5: parser error : Specification mandate value for
attribute fo
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
yt:fo
^
/tmp/youtube/2.xml:5: parser error : attributes construct error
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
yt:fo
^
/tmp/youtube/2.xml:5: parser error : Couldn't find end of Start Tag content
line 5
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
- Ignored:
yt:fo
^
/tmp/youtube/2.xml:5: parser error : Premature end of data in tag group line
5
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
yt:fo
^
/tmp/youtube/2.xml:5: parser error : Premature end of data in tag entry line
1
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
yt:fo
^
/tmp/youtube/2.xml:5: parser error : Premature end of data in tag feed line
1
ideo.3gp' type='video/3gpp' medium='video' _expression_='full' duration='14'
yt:fo
Here I can use mutex to avoid this but it has to wait for lock . I want to
open the xml file and parse simultaneouly.
How can I handle this ,suggest me.
regards,
~bhadra
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]