Ideally, what I would like to be able to do is:
cat xhtmlfile.xhtml | getElementViaXPath --path=\'/html/head/title\' | sed -e \'s%(^|
You can use xpath utility. It's installed with the Perl XML-XPath package.
Usage:
/usr/bin/xpath [filename] query
or XMLStarlet. To install it on opensuse use:
sudo zypper install xmlstarlet
or try cnf xml on other platforms.
cnf xml