>_ IzzyLab

Topic breakdown

xmlstarlet is a command-line tool for working with XML; its sel (select) subcommand pulls data by an XPath address expression, where -t begins the output template and -v prints the value of the expression. XPath describes a path through the tag tree, and selecting a specific element among similar ones is helped by a predicate in square brackets — a condition on an attribute of the form [@attribute='value']. The point of the task is to learn to address the right node by its attribute and extract the text of an element nested in it.

What's checked

  1. title of book b2 extracted

What it looks like