Xpath selecting nodes based on multiple attributes
-
Hello, I have a xml file and try to select nodes with a xpath query based on multiple attribute values, but can't get it to work. please tell me the correct xpath. here's part of the xml:
and here's my xpath query:
//AppInt [@ID="91"]/Setpoints [Setpoint/@JobID="1002" and Setpoint/@ModeID="1"]/@Name
-
Hello, I have a xml file and try to select nodes with a xpath query based on multiple attribute values, but can't get it to work. please tell me the correct xpath. here's part of the xml:
and here's my xpath query:
//AppInt [@ID="91"]/Setpoints [Setpoint/@JobID="1002" and Setpoint/@ModeID="1"]/@Name
Which nodes are you trying to select?
-
Hello, I have a xml file and try to select nodes with a xpath query based on multiple attribute values, but can't get it to work. please tell me the correct xpath. here's part of the xml:
and here's my xpath query:
//AppInt [@ID="91"]/Setpoints [Setpoint/@JobID="1002" and Setpoint/@ModeID="1"]/@Name
Try this:
//AppInt[@ID="91"]/Setpoints/Setpoint[@JobID="1002" and @ModeID="1"]/@Name
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Which nodes are you trying to select?
You asked the right question: I was trying to select the setpoint nodes, so i must remove the @Name.