xmllint unknown option '--xpath'

前端 未结 4 1758
夕颜
夕颜 2020-12-10 11:01

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 x

4条回答
  •  青春惊慌失措
    2020-12-10 11:14

    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()'
    

提交回复
热议问题