Crash while using LocalFileFormatTarget

N

Neelam

Hi,

I am using DOMWriter to write into the xml as:
(Using Xerces-c-2.7.0. and visual studio 2005)

string file = "E:\\Conf.xml";
XMLCh * filename = XMLString::transcode(file.c_str());

XMLFormatTarget * fileTarget = new
LocalFileFormatTarget(filename); // this line causes crash

It some times throws IOException while running from multiple threads.
I have taken care of Thread safety.

Please, suggest me solution for this, or some other way to write
DOMNode to the disk.
 
J

Joe Kesselman

Neelam said:
It some times throws IOException while running from multiple threads.
I have taken care of Thread safety.

What does the exception give as its reason for failing? It sounds like
you have NOT take care of thread safety, and have multiple threads
trying to step on the same file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,008
Messages
2,570,269
Members
46,871
Latest member
Stephendes

Latest Threads

Top