I have a > requirement I didn't disclose: the simple tags like <TRNUID>, <NAME>, > <AMOUNT> could come in any order; and some are optional. Search for "permutation parsing"; Doaitse has thought of that too! Regards, Malcolm