好用的xml工具libXmL2

最近在做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

至此安装完成!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。