Xidel
Xidel is a cli webpage scraping tool supporting XPath/XQuery 3 and CSS
... text/XML/JSON, or assigned to variables to use in other extract expressions.
It also provides an online CGI service for testing of XPath / XQuery 3.0 expression.
(Xidel is a part of the VideLibri project, so its project page just redirects there )