How do I access an attribute from the outer node inside an inner condition?
-
Monday, November 12, 2012 8:22 PM
Hi all;
I want to perform the following XPath: /Configs/Category/InputMenu/Config[@Value = 'DualPack' and (/Configs/Category/MasterSlave/Config[@No = ./@No]/@Value = 'Master')]
Where the "./@No" in the part"[@No = ./@No]" is from /Configs/Category/InputMenu/Config@No, not from /Configs/Category/MasterSlave/Config@No
How can I specify that the ./@No is from that outer node?
thanks - dave
Who will win The Windward International Collegiate Programming Championships?
All Replies
-
Monday, November 12, 2012 9:50 PM
Try this:
/Configs/Category/InputMenu/Config[@Value = 'DualPack' and (/Configs/Category/MasterSlave/Config[@No = ../../InputMenu/Config/@No]/@Value = 'Master')]
Morten la Cour
- Marked As Answer by DavidThi808 Monday, November 12, 2012 11:32 PM
-
Monday, November 12, 2012 11:32 PM
I feel like an idiot - that works great.
thanks
Who will win The Windward International Collegiate Programming Championships?

