问题描述
问题是我正在尝试使用xmllint验证xml文件.在我的机器(OSX 10f.7.5)上,它说xml无效.当同事在他的机器上尝试时,它说这是有效的.我不确定他正在运行什么版本的OSX,但我确实知道我的xmllint版本是
The problem is that I am trying to validate an xml file using xmllint. On my machine (OSX 10f.7.5) it says the xml is invalid. When a co-worker tries it on his machine, it says it is valid. I am not sure what version of OSX he is running but I do know that my version of xmllint is
$ xmllint --version
xmllint: using libxml version 20703
他的版本是
$ xmllint --version
xmllint: using libxml version 20708
所以问题是如何在计算机上构建该版本(或最新版本)?
So the question is how do I build that version (or the latest version) on my machine?
推荐答案
似乎xmlstarlet软件包包含xmllint,因此应该可以解决问题:
It seems that the xmlstarlet package contains xmllint, so this should do the trick:
brew install xmlstarlet
我不确定您如何获得特定版本.
I'm not sure how you would get a specific version though.
这篇关于如何在OSX 10.7.5上安装xmllint的最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!