in reply to Re: Search and replace again
in thread Search and replace again
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Search and replace again
by crashtest (Curate) on Apr 20, 2010 at 00:46 UTC | |
by ikegami (Patriarch) on Apr 20, 2010 at 01:39 UTC | |
by crashtest (Curate) on Apr 20, 2010 at 18:17 UTC | |
by ikegami (Patriarch) on Apr 20, 2010 at 20:04 UTC |