Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When you refer to multiple nodes you refer to a node set.

In the example image to the right the expression

/drofus-xml/room-container/room

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

/drofus-xml/property-set/@project_name

There are also functions that you can use to make tests or other operations, e.g. sum, count etc:

The expression

count(/drofus-xml/room-container/room)

returns the number of rooms in this document, 2.

Image RemovedImage Added