Using Twig you could do something like below.
use strict; use XML::Twig; $file = 'test.xml'; my $twig = XML::Twig->new( twig_handlers => { div => \&div_handler }, pretty_print => 'indented' ); $twig->parsefile($file); $twig->flush(); sub div_handler { my ($twig, $div)= @_; if($div->{'att'}->{'class'} eq "P_FM_EPG_INTRO_FIRST") { $div->set_tag('paragraph'); $div->set_att(class => "PFMEPGINTROFIRST"); $div->set_att(style => "FM_EPG_INTRO_FIRST"); } }
In reply to Re^2: xml to xml with script process
by mickep76
in thread xml to xml with script process
by Selvakumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |