in reply to Group XML
I do not understand exactly what should be wrapped into groups (the beginning of the output is missing, anyway). To insert CDATA and change rid attributes, you can use XML::XSH2 in this way:
The rest would be also possible if you can explain the algorithm.open 908451.xml ; for $t in //title/text() insert cdata $t replace $t ; for //article-ref/@rid insert text xsh:subst(., '.*-2_' , '') replace . ;
|
---|
In Section
Seekers of Perl Wisdom