in reply to my xml xpath is too slow.
Hard to say without seeing the XML, but I would use XML::Rules to trim and simplify the data before entering the look.
Jenda Enoch was right! Enjoy the last years of Rome.