美文网首页
好用的xml工具libXmL2

好用的xml工具libXmL2

作者: Java_Rock | 来源:发表于2017-12-12 20:14 被阅读0次

最近在做soap风格的WebService开发,
Mac 可以在命令行通过curl 测试soap 的接口,response是xml格式的

  • 没使用libXml2之前:
    命令:
    curl --header "content-type: text/xml" -d @request.xml http://localhost:8080/ws

    picture1.png
  • 使用了libXml2之后:
    命令:
    curl -s --header "content-type: text/xml" -d @request.xml http://localhost:8080/ws | xmllint --format -

    picture2.png

在Mac系统下libXmL2的安装

  1. 官网下载libXmL2,然后进行解压
  2. 进入libXmL2的目录
  3. 命令行输入./configure
  4. 执行 make
  5. 执行 sudo make install

至此安装完成!

相关文章

网友评论

      本文标题:好用的xml工具libXmL2

      本文链接:https://www.haomeiwen.com/subject/swanixtx.html