>_ IzzyLab

Topic breakdown

XPath is not only about selecting nodes but also functions over the set of found nodes. To find out how many elements match an expression, you apply the node-counting function, passing it the path to all the elements of interest. The task shows that the result of xmlstarlet sel -t -v can be not a node's text but a number computed over the tree.

What's checked

  1. the book count is correct

What it looks like