xmllint unknown option '--xpath'
xmllint, xpath
Solution
xmllint --shell tmp.xml <<<'xpath /plist/array/string/text()'
If you need to make xmllint to read stdin:
cat /tmp/tmp.xml | xmllint --shell <(cat) <<<'xpath /plist/array/string/text()'
Problem
I've seen this syntax several places (eg, here): `xmllint --xpath '/plist/array/string/text()' tmp.xml`, used to query a particular XML node using an xpath selector. However, I'm getting the error `Unknown option --xpath` when I try to execute this on my machine (mac os x snow leopard). Looking more closely at the man page for xmllint, I don't see the `--xpath` option documented... Am I just totally missing something here?