daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jan 16th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <dependencies name="dependency">
  2.   <poi org="ossjava" rev="3.6.0" />
  3. </dependencies>
  4.    
  5. <dependencies>
  6.        <dependency org="ossjava" name="poi" rev="3.6.0"/>
  7. </dependencies>
  8.    
  9. use XML::LibXML qw( );
  10.  
  11. my $qfn = 'ivy.xml';
  12.  
  13. my $parser = XML::LibXML->new();
  14. my $doc    = $parser->parse_file($qfn);
  15. my $root   = $doc->documentElement();
  16.  
  17. for my $poi ($root->findnodes('//poi')) {
  18.    $poi->setAttribute('rev', process($poi->getAttribute('rev')));
  19. }
  20.  
  21. $doc->toFile($qfn);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top