Help for this page
XML::Twig->new( twig_roots => { q{elt[@id="id1"]} => sub { $_->set_tex +t( "new_val")->print} }, twig_print_outside_roots => 1, ) ->parsefile( "my_xml")