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 :)
In reply to Re: how to change node value based on other node value
by Anonymous Monk
in thread how to change node value based on other node value
by ccherri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |