%general-entities; ]> libxml2-&libxml2-version; libxml2 Introduction to libxml2 The libxml2 package contains libraries and utilities used for parsing XML files. &lfs121_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &libxml2-md5sum; Download size: &libxml2-size; Estimated disk space required: &libxml2-buildsize; Estimated build time: &libxml2-time; Additional Downloads Optional Test Suite: - This enables make check to do complete testing. libxml2 Dependencies Recommended Optional (may be used in the tests) Installation of libxml2 Install libxml2 by running the following commands: ./configure --prefix=/usr \ --sysconfdir=/etc \ --disable-static \ --with-history \ --with-icu \ PYTHON=/usr/bin/python3 \ --docdir=/usr/share/doc/libxml2-&libxml2-version; && make If you downloaded the test suite, issue the following command: tar xf ../xmlts&testsuite-version;.tar.gz To test the results, issue: make check > check.log. This command will print several lines of error messages like Failed to parse xstc/... because some test files are missing and these messages can be safely ignored. A summary of the results can be obtained with grep -E '^Total|expected|Ran' check.log. If is installed and you want to check for memory leaks, replace check with check-valgrind. The tests use http://localhost/ to test parsing of external entities. If the machine where you run the tests serves as a web site, the tests may hang, depending on the content of the file served. It is therefore recommended to shut down the server during the tests, as the root user: /etc/init.d/httpd stop systemctl stop httpd.service Now, as the root user: make install Finally, prevent some packages from unnecessarily linking to ICU using the following commands as the &root; user: rm -vf /usr/lib/libxml2.la && sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config Command Explanations --with-history: This switch enables Readline support when running xmlcatalog or xmllint in shell mode. --with-icu: This switch enables support for ICU, which provides additional Unicode support. This is needed for some packages in BLFS, such as for QtWebEngine. PYTHON=/usr/bin/python3: Allows building the libxml2 module with Python3 instead of Python2. Contents Installed Programs Installed Libraries Installed Directories xml2-config, xmlcatalog, and xmllint libxml2.so /usr/include/libxml2, /usr/lib/cmake/libxml2, /usr/share/doc/libxml2-&libxml2-version;, and /usr/share/gtk-doc/html/libxml2 Short Descriptions xml2-config determines the compile and linker flags that should be used to compile and link programs that use libxml2 xml2-config xmlcatalog is used to monitor and manipulate XML and SGML catalogs xmlcatalog xmllint parses XML files and outputs reports (based upon options) to detect errors in XML coding xmllint libxml2.so provides functions for programs to parse files that use the XML format libxml2.so