Merge "Do not export libandroidicu headers"
tree: cd5b3ba6ab9ca62685e9d2c77a665fb201627d6d
  1. .gitlab-ci/
  2. doc/
  3. example/
  4. fuzz/
  5. include/
  6. m4/
  7. os400/
  8. python/
  9. result/
  10. test/
  11. vms/
  12. win32/
  13. xstc/
  14. .editorconfig
  15. .gitattributes
  16. .gitignore
  17. .gitlab-ci.yml
  18. Android.bp
  19. autogen.sh
  20. buf.c
  21. build_glob.py
  22. c14n.c
  23. catalog.c
  24. check-relaxng-test-suite.py
  25. check-relaxng-test-suite2.py
  26. check-xinclude-test-suite.py
  27. check-xml-test-suite.py
  28. check-xsddata-test-suite.py
  29. chvalid.c
  30. chvalid.def
  31. CleanSpec.mk
  32. CMakeLists.txt
  33. config.h
  34. config.h.cmake.in
  35. configure.ac
  36. Copyright
  37. dbgen.pl
  38. dbgenattr.pl
  39. debugXML.c
  40. dict.c
  41. encoding.c
  42. entities.c
  43. error.c
  44. genChRanges.py
  45. gentest.py
  46. genUnicode.py
  47. global.data
  48. globals.c
  49. hash.c
  50. HTMLparser.c
  51. HTMLtree.c
  52. legacy.c
  53. libxml-2.0-uninstalled.pc.in
  54. libxml-2.0.pc.in
  55. libxml.h
  56. libxml.m4
  57. libxml2-config.cmake.cmake.in
  58. libxml2-config.cmake.in
  59. libxml2.doap
  60. libxml2.syms
  61. list.c
  62. MAINTAINERS.md
  63. Makefile.am
  64. METADATA
  65. MODULE_LICENSE_MIT
  66. nanoftp.c
  67. nanohttp.c
  68. NEWS
  69. OWNERS
  70. parser.c
  71. parserInternals.c
  72. pattern.c
  73. post_update.sh
  74. README.md
  75. README.zOS
  76. relaxng.c
  77. rngparser.c
  78. runsuite.c
  79. runtest.c
  80. runxmlconf.c
  81. SAX.c
  82. SAX2.c
  83. schematron.c
  84. testapi.c
  85. testchar.c
  86. testdict.c
  87. testdso.c
  88. testlimits.c
  89. testModule.c
  90. testOOM.c
  91. testOOMlib.c
  92. testOOMlib.h
  93. testrecurse.c
  94. testThreads.c
  95. threads.c
  96. timsort.h
  97. tree.c
  98. trio.c
  99. trio.h
  100. triodef.h
  101. trionan.c
  102. trionan.h
  103. triop.h
  104. triostr.c
  105. triostr.h
  106. uri.c
  107. valid.c
  108. xinclude.c
  109. xlink.c
  110. xml2-config.in
  111. xmlcatalog.c
  112. xmlIO.c
  113. xmllint.c
  114. xmlmemory.c
  115. xmlmodule.c
  116. xmlreader.c
  117. xmlregexp.c
  118. xmlsave.c
  119. xmlschemas.c
  120. xmlschemastypes.c
  121. xmlstring.c
  122. xmlunicode.c
  123. xmlwriter.c
  124. xpath.c
  125. xpointer.c
  126. xzlib.c
README.md

libxml2

libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project.

Official releases can be downloaded from https://download.gnome.org/sources/libxml2/

The git repository is hosted on GNOME's GitLab server: https://gitlab.gnome.org/GNOME/libxml2

Bugs should be reported at https://gitlab.gnome.org/GNOME/libxml2/-/issues

Documentation is available at https://gitlab.gnome.org/GNOME/libxml2/-/wikis

License

This code is released under the MIT License, see the Copyright file.

Build instructions

libxml2 can be built with GNU Autotools, CMake, or several other build systems in platform-specific subdirectories.

Autotools (for POSIX systems like Linux, BSD, macOS)

If you build from a Git tree, you have to install Autotools and start by generating the configuration files with:

./autogen.sh

If you build from a source tarball, extract the archive with:

tar xf libxml2-xxx.tar.gz
cd libxml2-xxx

To see a list of build options:

./configure --help

Also see the INSTALL file for additional instructions. Then you can configure and build the library:

./configure [possible options]
make

Note that by default, no optimization options are used. You have to enable them manually, for example with:

CFLAGS='-O2 -fno-semantic-interposition' ./configure

Now you can run the test suite with:

make check

Please report test failures to the mailing list or bug tracker.

Then you can install the library:

make install

At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.

CMake (mainly for Windows)

Another option for compiling libxml is using CMake:

cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build [possible options]
cmake --build libxml2-xxx-build
cmake --install libxml2-xxx-build

Common CMake options include:

-D BUILD_SHARED_LIBS=OFF            # build static libraries
-D CMAKE_BUILD_TYPE=Release         # specify build type
-D CMAKE_INSTALL_PREFIX=/usr/local  # specify the install path
-D LIBXML2_WITH_ICONV=OFF           # disable iconv
-D LIBXML2_WITH_LZMA=OFF            # disable liblzma
-D LIBXML2_WITH_PYTHON=OFF          # disable Python
-D LIBXML2_WITH_ZLIB=OFF            # disable libz

You can also open the libxml source directory with its CMakeLists.txt directly in various IDEs such as CLion, QtCreator, or Visual Studio.

Dependencies

Libxml does not require any other libraries. A platform with somewhat recent POSIX support should be sufficient (please report any violation to this rule you may find).

However, if found at configuration time, libxml will detect and use the following libraries:

  • libz, a highly portable and widely available compression library.
  • liblzma, another compression library.
  • libiconv, a character encoding conversion library. The iconv function is part of POSIX.1-2001, so libiconv isn't required on modern UNIX-like systems like Linux, BSD or macOS.
  • ICU, a Unicode library. Mainly useful as an alternative to iconv on Windows. Unnecessary on most other systems.

Contributing

The current version of the code can be found in GNOME's GitLab at at https://gitlab.gnome.org/GNOME/libxml2. The best way to get involved is by creating issues and merge requests on GitLab. Alternatively, you can start discussions and send patches to the mailing list. If you want to work with patches, please format them with git-format-patch and use plain text attachments.

All code must conform to C89 and pass the GitLab CI tests. Add regression tests if possible.

Authors

  • Daniel Veillard
  • Bjorn Reese
  • William Brack
  • Igor Zlatkovic for the Windows port
  • Aleksey Sanin
  • Nick Wellnhofer