Command-line tools that can be called from shell scripts include:
4xpath - command-line wrapper around Python's 4Suite package
xpath - command-line wrapper around Perl's XPath library
sudo apt-get install libxml-xpath-perl
Xidel - Works with URLs as well as files. Also works with JSON
I also use xmllint and xsltproc with little XSL transform scripts to do XML processing from the command line or in shell scripts.