一部のデータに対して xpath を実行するために、bash スクリプトで xmllint を使用しています。xpath は常にデータと一致するとは限りませんが、これは問題ありません。xmllint ドキュメントから:
--xpath "XPath_expression"
Run an XPath expression given as argument and print the result. In case of a nodeset result, each node in the node set is serialized in full in the output. In case of an empty node set the "XPath set is
empty" result will be shown and an error exit code will be returned.
XPath set is empty
xmllint が一致するものを見つけられない場合、出力を無効/非表示にする方法はありますか?