Guest User

Untitled

a guest
Jan 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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);
Add Comment
Please, Sign In to add comment