in reply to Using XML::XPath to change values

Using XML::LibXML :
#! /usr/bin/perl use warnings; use strict; use XML::LibXML; my $doc = 'XML::LibXML'->load_xml(location => shift); for my $include ($doc->findnodes('/includes/include')) { my $priority = $include->find('priority/text()')->[0]; $priority->setData($priority->data + 1); } print $doc;

or, less verbose XML::XSH2 :

open file.xml ; for /includes/include set priority (priority + 1) ; save :b ;

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,