...
When you refer to multiple nodes you refer to a node set. In the example image to the right the expression
refers to all the room nodes under the room-container node, in this case two rooms. You use this kind of XPath expression when you want to do something for each room in the XML. If you want to get a specific attribute value, such as the value of the project name attribute, you can use
There are also functions that you can use to make tests or other operations, e.g. sum, count etc: The expression
returns the number of rooms in this document, 2. |