Related Path Conditionals

Parent Previous Next



Related path conditionals


Related path conditionals take the form:



[<path>]



Path is a path that can be found from the current object, and can contain the full array of path syntax allowed, including conditionals. So, a simple path conditional might be (referring to the test tree in the introduction topic) used to find all nodes that have a child node called X:



//*[./X]



Or, we might want to find all nodes that have a child node called X where that X node also has a property with a key ‘Test’ and a value ‘123’:



//*[./X[@Test==”123”]]