I have two XML files. One is the main XML file and the other one is used as a lookup table. Here is the main XML:
Maybe something like this would be simpler: