compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I have mentioned few below,

  1. Write a java programme which would read the XML(input) and compare against a UNIX directory structure.

  2. Write a shell programme which read flat file and check for the existence of the file in UNIX directory structure..

Quick respose is appreciated !

I'd pick Perl over either of those, but depends a lot on what you're familiar with.

Writing a shell script (bash, ksh, etc.) and using a flat file would be preferable to using Java and XML. In my opinion, you are overcomplicating the problem by using Java and XML.

Could you please give code for above 2 approaches ? I am using c-shell...

Unless there is a specific reason for using the C shell, I recommend that you use bash or ksh because of their richer feature set.

Does anyone has the code for this mainly in Java ?

If I understand at all what you are trying to do, it's basically a one-liner in shell.

#!/bin/sh

while read file; do test -x "$file" && echo "have $file" || echo "no $file (or not executable)"; done <<HERE
/bin/echo
/no/such/path
/etc/issue
/home/era/.xsession
HERE