Thank you for your support!
I didn't consider CSS selectors as an alternative to Xpath, but really like the idea. Absolutely agree CSS selectors will be more convenient :)
htmlq does this by having various command line options like --attribute and --text.