Hi Jeff,
>Will this example only find the duplicates if they are one after the other? What if the file is not in SSN order?
The order doesn't matter. The code retains the first physical occurrence of an SSN and deletes all remaining one where ever they are. BTW, "Data" is the name I used for the root node. You need to change this according to your actual data as the name of the root wasn't in your original posting.
--
Christof