paisani has asked for the wisdom of the Perl Monks concerning the following question:
-- Code snippet below -<includes> <include> <priority>9990</priority> <required>true</required> <location>/efs/dist/tpcommon/itrstemplates/latest/common/templ +ates/equities.xml</location> </include> <include disabled="true"> <priority>10001</priority> <required>true</required> <location>/efs/dist/itrs/tools/latest/common/templates/global_ +authentication.xml</location> </include> </includes>
my $path = '//includes/include'; my $nodes = $xp->find($path); for my $include ($nodes->get_nodelist) { my $priority = $xp->find('./priority', $include); my $location = $xp->find('./location', $include); print "Location = " . $location->string_value; print ", with Priority = " . $priority->string_value . "\n"; ## I want to change this priority value to +1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using XML::XPath to change values
by haukex (Archbishop) on Feb 12, 2018 at 21:59 UTC | |
|
Re: Using XML::XPath to change values
by Cristoforo (Curate) on Feb 12, 2018 at 19:52 UTC | |
|
Re: Using XML::XPath to change values
by Jenda (Abbot) on Feb 12, 2018 at 21:57 UTC | |
|
Re: Using XML::XPath to change values
by choroba (Cardinal) on Feb 13, 2018 at 09:54 UTC | |
|
Re: Using XML::XPath to change values
by Anonymous Monk on Feb 13, 2018 at 13:47 UTC |