You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matt Knight 9627d4196c Rearchitect Regz (#63) 7 months ago
..
doc Rearchitect Regz (#63) 7 months ago
example Rearchitect Regz (#63) 7 months ago
fuzz Rearchitect Regz (#63) 7 months ago
include Rearchitect Regz (#63) 7 months ago
m4 Rearchitect Regz (#63) 7 months ago
optim Rearchitect Regz (#63) 7 months ago
os400 Rearchitect Regz (#63) 7 months ago
python Rearchitect Regz (#63) 7 months ago
result Rearchitect Regz (#63) 7 months ago
test Rearchitect Regz (#63) 7 months ago
vms Rearchitect Regz (#63) 7 months ago
win32 Rearchitect Regz (#63) 7 months ago
xstc Rearchitect Regz (#63) 7 months ago
.gitattributes Rearchitect Regz (#63) 7 months ago
.gitignore Rearchitect Regz (#63) 7 months ago
.gitlab-ci.yml Rearchitect Regz (#63) 7 months ago
CMakeLists.txt Rearchitect Regz (#63) 7 months ago
Copyright Rearchitect Regz (#63) 7 months ago
HTMLparser.c Rearchitect Regz (#63) 7 months ago
HTMLtree.c Rearchitect Regz (#63) 7 months ago
Makefile.am Rearchitect Regz (#63) 7 months ago
Makefile.tests Rearchitect Regz (#63) 7 months ago
NEWS Rearchitect Regz (#63) 7 months ago
README.md Rearchitect Regz (#63) 7 months ago
README.tests Rearchitect Regz (#63) 7 months ago
README.zOS Rearchitect Regz (#63) 7 months ago
SAX.c Rearchitect Regz (#63) 7 months ago
SAX2.c Rearchitect Regz (#63) 7 months ago
TODO Rearchitect Regz (#63) 7 months ago
TODO_SCHEMAS Rearchitect Regz (#63) 7 months ago
autogen.sh Rearchitect Regz (#63) 7 months ago
buf.c Rearchitect Regz (#63) 7 months ago
buf.h Rearchitect Regz (#63) 7 months ago
build_glob.py Rearchitect Regz (#63) 7 months ago
c14n.c Rearchitect Regz (#63) 7 months ago
catalog.c Rearchitect Regz (#63) 7 months ago
check-relaxng-test-suite.py Rearchitect Regz (#63) 7 months ago
check-relaxng-test-suite2.py Rearchitect Regz (#63) 7 months ago
check-xinclude-test-suite.py Rearchitect Regz (#63) 7 months ago
check-xml-test-suite.py Rearchitect Regz (#63) 7 months ago
check-xsddata-test-suite.py Rearchitect Regz (#63) 7 months ago
chvalid.c Rearchitect Regz (#63) 7 months ago
chvalid.def Rearchitect Regz (#63) 7 months ago
config.h.cmake.in Rearchitect Regz (#63) 7 months ago
configure.ac Rearchitect Regz (#63) 7 months ago
dbgen.pl Rearchitect Regz (#63) 7 months ago
dbgenattr.pl Rearchitect Regz (#63) 7 months ago
debugXML.c Rearchitect Regz (#63) 7 months ago
dict.c Rearchitect Regz (#63) 7 months ago
enc.h Rearchitect Regz (#63) 7 months ago
encoding.c Rearchitect Regz (#63) 7 months ago
entities.c Rearchitect Regz (#63) 7 months ago
error.c Rearchitect Regz (#63) 7 months ago
genChRanges.py Rearchitect Regz (#63) 7 months ago
genUnicode.py Rearchitect Regz (#63) 7 months ago
gentest.py Rearchitect Regz (#63) 7 months ago
global.data Rearchitect Regz (#63) 7 months ago
globals.c Rearchitect Regz (#63) 7 months ago
hash.c Rearchitect Regz (#63) 7 months ago
legacy.c Rearchitect Regz (#63) 7 months ago
libxml-2.0-uninstalled.pc.in Rearchitect Regz (#63) 7 months ago
libxml-2.0.pc.in Rearchitect Regz (#63) 7 months ago
libxml.h Rearchitect Regz (#63) 7 months ago
libxml.m4 Rearchitect Regz (#63) 7 months ago
libxml.spec.in Rearchitect Regz (#63) 7 months ago
libxml2-config.cmake.cmake.in Rearchitect Regz (#63) 7 months ago
libxml2-config.cmake.in Rearchitect Regz (#63) 7 months ago
libxml2.doap Rearchitect Regz (#63) 7 months ago
libxml2.syms Rearchitect Regz (#63) 7 months ago
list.c Rearchitect Regz (#63) 7 months ago
nanoftp.c Rearchitect Regz (#63) 7 months ago
nanohttp.c Rearchitect Regz (#63) 7 months ago
parser.c Rearchitect Regz (#63) 7 months ago
parserInternals.c Rearchitect Regz (#63) 7 months ago
pattern.c Rearchitect Regz (#63) 7 months ago
relaxng.c Rearchitect Regz (#63) 7 months ago
rngparser.c Rearchitect Regz (#63) 7 months ago
runsuite.c Rearchitect Regz (#63) 7 months ago
runtest.c Rearchitect Regz (#63) 7 months ago
runxmlconf.c Rearchitect Regz (#63) 7 months ago
save.h Rearchitect Regz (#63) 7 months ago
schematron.c Rearchitect Regz (#63) 7 months ago
testAutomata.c Rearchitect Regz (#63) 7 months ago
testModule.c Rearchitect Regz (#63) 7 months ago
testOOM.c Rearchitect Regz (#63) 7 months ago
testOOMlib.c Rearchitect Regz (#63) 7 months ago
testOOMlib.h Rearchitect Regz (#63) 7 months ago
testThreads.c Rearchitect Regz (#63) 7 months ago
testapi.c Rearchitect Regz (#63) 7 months ago
testchar.c Rearchitect Regz (#63) 7 months ago
testdict.c Rearchitect Regz (#63) 7 months ago
testdso.c Rearchitect Regz (#63) 7 months ago
testlimits.c Rearchitect Regz (#63) 7 months ago
testrecurse.c Rearchitect Regz (#63) 7 months ago
threads.c Rearchitect Regz (#63) 7 months ago
timsort.h Rearchitect Regz (#63) 7 months ago
tree.c Rearchitect Regz (#63) 7 months ago
trio.c Rearchitect Regz (#63) 7 months ago
trio.h Rearchitect Regz (#63) 7 months ago
triodef.h Rearchitect Regz (#63) 7 months ago
trionan.c Rearchitect Regz (#63) 7 months ago
trionan.h Rearchitect Regz (#63) 7 months ago
triop.h Rearchitect Regz (#63) 7 months ago
triostr.c Rearchitect Regz (#63) 7 months ago
triostr.h Rearchitect Regz (#63) 7 months ago
uri.c Rearchitect Regz (#63) 7 months ago
valid.c Rearchitect Regz (#63) 7 months ago
xinclude.c Rearchitect Regz (#63) 7 months ago
xlink.c Rearchitect Regz (#63) 7 months ago
xml2-config.in Rearchitect Regz (#63) 7 months ago
xmlIO.c Rearchitect Regz (#63) 7 months ago
xmlcatalog.c Rearchitect Regz (#63) 7 months ago
xmllint.c Rearchitect Regz (#63) 7 months ago
xmlmemory.c Rearchitect Regz (#63) 7 months ago
xmlmodule.c Rearchitect Regz (#63) 7 months ago
xmlreader.c Rearchitect Regz (#63) 7 months ago
xmlregexp.c Rearchitect Regz (#63) 7 months ago
xmlsave.c Rearchitect Regz (#63) 7 months ago
xmlschemas.c Rearchitect Regz (#63) 7 months ago
xmlschemastypes.c Rearchitect Regz (#63) 7 months ago
xmlstring.c Rearchitect Regz (#63) 7 months ago
xmlunicode.c Rearchitect Regz (#63) 7 months ago
xmlwriter.c Rearchitect Regz (#63) 7 months ago
xpath.c Rearchitect Regz (#63) 7 months ago
xpointer.c Rearchitect Regz (#63) 7 months ago
xzlib.c Rearchitect Regz (#63) 7 months ago
xzlib.h Rearchitect Regz (#63) 7 months ago

README.md

libxml2

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

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

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

A mailing list xml@gnome.org is available. You can subscribe at https://mail.gnome.org/mailman/listinfo/xml. The list archive is at https://mail.gnome.org/archives/xml/.

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