use strict; use warnings; use XML::LibXML qw( ); my $parser = XML::LibXML->new(); my $doc = $parser->parse_file($ARGV[0]); my $root = $doc->documentElement(); for my $node ($root->findnodes('//image[@scope="local"]')) { $node->removeAttribute('scope'); } binmode STDOUT; print $doc->toString();
I'm not even gonna try an XML::Simple solution.
In reply to Re^2: Search and replace again
by ikegami
in thread Search and replace again
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |