in reply to comparing XML files

How about you supply some samples of your actual data, rather than just giving us clues? It makes it much easier to suggest a solution.