To print the document: $t->print prints the entire document. You don't have to do the inner loop yourself.
In reply to Re^3: XML::Twig and paste by mirod in thread XML::Twig and paste by jezzica85