官网:http://xmlsoft.org/

    源代码获取:

    1. git clone https://gitlab.gnome.org/GNOME/libxml2.git

    源代码编译:

    1. git checkout v2.9.3
    2. env CFLAGS="-mmacosx-version-min=10.9" ./configure --enable-static --prefix=/tmp/libxml2
    3. make
    4. sudo make install

    使用该命令 otool -l libxml2.a | grep version 可以看到编译出来的库最低支持版本。