#!/bin/sh

while read -r XPATH ; do
    ./xmlstarlet sel --text -t -m "/*[boolean($XPATH)]" -v "$XPATH" --nl xml/foo.xml
done < sel-xpath.input
