in reply to how to change node value based on other node value
but that doesnt work. I cant figure out how to change the voltage based on the value of Name.
"doesn't work" isn't diagnostic ... :)
but, even in xpath, you can't make syntax up :) grab xpather.pl and see what it spits out
/Settings/Channels/Channel[4] # posy /Settings[1]/Channels[1]/Channel[4] # star /*[ local-name() = "Settings" and position() = 1 ] /*[ local-name() = "Channels" and position() = 1 ] /*[ local-name() = "Channel" and @Name = "L360" and @Voltage = "120" and @Test = "1" ] # rats /Settings[1] /Channels[1] /*[ name() = "Channel" and position() = 4 and @Name = "L360" and @Vol +tage = "120" and @Test = "1" ]
So next step is adjust your xpath to be valid :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to change node value based on other node value
by ccherri (Acolyte) on Apr 08, 2015 at 17:30 UTC | |
by Anonymous Monk on Apr 08, 2015 at 22:50 UTC |