XML::Twig is a great way to go though you may find better performance if you refactor your approach to use SAX via CPAN
: hmmmm, after running some benchmarks myself ...I stand corrected ... I seem to have been passing on this duft knowledge for too long; thank you to mirod for opening my eyes ... XML::Twig is indeed faster in a lot of situations and I think you are going down the right route, past perhaps considering another tool outside of perl.