If you're on Windows, the operating system won't let you
do this. On other operating systems you'll have to do something
like create a temporary ".lock" file and not process the XML file
if a ".lock" file exists. You must be careful because there is
a race condition creating the .lock file so you must be able
to tell which process created it first. I usually write the process
number to the file then read back the first line of the file to
make sure it is my process. Otherwise some other process
created the .lock file so the current process must wait until
it is deleted by the owning process.