National_Instruments
200-500 · Question #163
What XML component does the following XPath query try to match? //foo[bar/@id=5]
The correct answer is E. all of the foo elements that have a child node bar, whose id attribute is equal to 5. See the full explanation below for the reasoning.
Question
What XML component does the following XPath query try to match? //foo[bar/@id=5]
Options
- Abar element with an id attribute whose value is equal to 5
- Bfoo element containing a child node bar tag
- Cid attribute whose value is equal to 5
- Dfoo element with a child note bar whose id attribute is equal to 5
- Eall of the foo elements that have a child node bar, whose id attribute is equal to 5
How the community answered
(58 responses)- A2% (1)
- B2% (1)
- C5% (3)
- D10% (6)
- E81% (47)
Community Discussion
No community discussion yet for this question.