Help for this page
use XML::Twig; my $t= XML::Twig->new(); $t->parse( '<d><title>title</title><para>p 1</para><para>p 2</para>< +/d>'); ... foreach my $para (@para) { $para->set_tag( 'p'); } # turn them into p $t->print; # output the document