in reply to Recursive XML navigation XML::Twig help!
You may be interested in Pulling out sections of an XMI file with XML::Twig which poses much the same problem. In particular see mirod's somewhat buried reply.