Help for this page

Select Code to Download


  1. or download this
    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