Definitely seconding pup, love it and it's easy to use with css selectors. Often use it to parse HTML tables of data on random websites into usable CSVs / etc.
xq looks interesting for pure XML, will add it to my notes.
Regarding xmlstarlet, I don't use it much but here's some stuff from my notes:
XML filter on xpath: xmlstarlet sel -t -c configuration/appender logback.xml; echo
XML editing: xmlstarlet ed -d configuration/root -d configuration/logger -s configuration -t elem -n woof -v 'Woof!' logback.xml
The last one deletes elements given by xpath "configuration/root" and "configuration/logger", then adds a new element with the contents <woof>Woof!</woof> under the xpath "configuration".