這是我的。它顯然沒有做到它應該做的事,甚至崩潰了。有什麼錯誤或者是否有任何其他工具可以幫助我在BASH中解析XML?xmllint無法正常使用xpath
:~$ cat test.xml
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ant.freeform</type>
</project>
:~$ xmllint --xpath '//type/text()' test.xml
Segmentation fault (core dumped)
:~$ xmllint --xpath '//type' test.xml
XPath set is empty
你使用的是哪個版本的libxml2('xmllint --version')? – nwellnhof 2013-03-13 17:11:09