Only an idea right now inspired by yq and jq. Not even under development. If you're interested, give me a shout.
Get the image tag element html from Google
dq http://google.com 'img[alt="Google"]'
Get the html from a local fille
dq index.html
Get each h2 title from a page
cat some.html | dq 'h2[*]'