I was editing/adding when you posted the reply, thanks Bitt.

With regards to the part I just added about checking to see if xmlstarlet fails to open its input file, I tried using the "$?" check as used elsewhere but this didn't work. It always seems to equal 0 when xmlstarlet fails to find the input file.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software