in reply to Replacing XML Tag name with another
I usually use XML::XSH2:
Or, more elaborate:open file ; rename Heading_1 /root/H1 ; rename Heading_2 /root/H2 ; save :b ;
Note that I use an underscore instead of a space, see mirod's Re: Replacing XML Tag name with another.rename :i { s/h/Heading_/ } /root/*[xsh:match(name(),'H[12]')] ;
|
---|
In Section
Seekers of Perl Wisdom