1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
XML parser and toolkit
Go to file
2022-04-03 14:37:45 +02:00
doc Don't overlink executables 2022-04-03 14:08:43 +02:00
example Don't overlink executables 2022-04-03 14:08:43 +02:00
fuzz Don't overlink executables 2022-04-03 14:08:43 +02:00
include Clean up encoding switching code 2022-04-02 19:09:12 +02:00
optim Fix typos 2020-03-08 17:41:53 +01:00
os400 Remove ICONV_CONST test 2022-03-04 22:08:58 +01:00
python python/tests: open() relative to test scripts 2022-03-30 22:00:50 +02:00
result Normalize XPath strings in-place 2022-03-05 18:22:51 +01:00
test Normalize XPath strings in-place 2022-03-05 18:22:51 +01:00
vms Remove ICONV_CONST test 2022-03-04 22:08:58 +01:00
win32 Mark docbook symbols as removed 2022-03-29 16:24:19 +02:00
xstc Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
.gitattributes Fix .gitattributes 2020-07-23 20:46:42 +02:00
.gitignore Ignore configure backup file created by recent autoreconf too 2022-03-29 15:49:01 +00:00
.gitlab-ci.yml Fix GitLab pages job 2022-04-02 16:55:18 +02:00
acinclude.m4 More updates and cleanups on autotools and Makefiles 2012-08-17 10:04:30 +08:00
autogen.sh Fix check for libtool in autogen.sh 2022-01-16 13:58:39 +01:00
buf.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
buf.h Fix and add const qualifiers 2014-10-13 16:06:21 +08:00
build_glob.py Update build_glob.py 2022-03-02 20:34:37 +01:00
c14n.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
catalog.c Respect --sysconfdir in source files 2022-03-30 14:36:49 +00:00
check-relaxng-test-suite2.py Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
check-relaxng-test-suite.py Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
check-xinclude-test-suite.py Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
check-xml-test-suite.py Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
check-xsddata-test-suite.py Port some test scripts to Python 3 2022-03-29 15:55:51 +02:00
chvalid.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
chvalid.def Remove executable bit from non-executable files 2019-09-16 15:48:59 +02:00
CMakeLists.txt Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS 2022-04-03 14:08:45 +02:00
config.h.cmake.in Remove ICONV_CONST test 2022-03-04 22:08:58 +01:00
configure.ac Remove LIBS from XML_PRIVATE_LIBS 2022-04-03 14:37:45 +02:00
Copyright Cleanup the Copyright to be pure MIT Licence wording 2012-09-20 21:46:19 +08:00
dbgen.pl add a Timingtests target to check bad behaviour from the streaming engine 2003-09-17 22:33:22 +00:00
dbgenattr.pl add a Timingtests target to check bad behaviour from the streaming engine 2003-09-17 22:33:22 +00:00
debugXML.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
dict.c Use non-recursive mutex in dict.c 2022-03-06 16:01:51 +01:00
enc.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00
encoding.c Deprecate module init and cleanup functions 2022-03-06 15:59:43 +01:00
entities.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
error.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
genChRanges.py Update genChRanges.py 2022-03-02 20:40:41 +01:00
gentest.py Remove DOCBparser 2022-03-04 22:56:21 +01:00
genUnicode.py Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
global.data Fix SetGenericErrorFunc and SetStructured clash 2009-08-24 17:34:25 +02:00
globals.c Deprecate module init and cleanup functions 2022-03-06 15:59:43 +01:00
hash.c Don't check for standard C89 library functions 2022-03-02 01:14:08 +01:00
HTMLparser.c Deprecate module init and cleanup functions 2022-03-06 15:59:43 +01:00
HTMLtree.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
legacy.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
libxml2-config.cmake.cmake.in Add variables for configured options to CMake config files 2021-01-05 22:03:47 +01:00
libxml2-config.cmake.in Add variables for configured options to CMake config files 2021-01-05 22:03:47 +01:00
libxml2.doap Remove broken VxWorks support 2022-03-01 17:18:56 +01:00
libxml2.syms Mark docbook symbols as removed 2022-03-29 16:24:19 +02:00
libxml-2.0-uninstalled.pc.in Detect libm using libtool's macros 2022-03-30 16:51:17 +02:00
libxml-2.0.pc.in Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS 2022-04-03 14:08:45 +02:00
libxml.3 libxml(3) manpage typo fix 2012-08-17 11:59:01 +08:00
libxml.h Respect --sysconfdir in source files 2022-03-30 14:36:49 +00:00
libxml.m4 Redirect links to xmlsoft.org 2022-02-13 23:10:00 +01:00
libxml.spec.in Fix source URL in libxml.spec.in 2022-02-14 22:49:04 +01:00
list.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
Makefile.am Remove LIBS from XML_PRIVATE_LIBS 2022-04-03 14:37:45 +02:00
Makefile.tests Fix typos 2020-03-08 17:41:53 +01:00
nanoftp.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
nanohttp.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
NEWS Update news and rebuild documentation 2022-02-19 19:26:42 +01:00
parser.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
parserInternals.c Clean up encoding switching code 2022-04-02 19:09:12 +02:00
pattern.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
README.md Add note about optimization flags 2022-02-20 21:49:05 +01:00
README.tests Update README.tests 2012-05-07 15:23:25 +08:00
README.zOS Large batch of typo fixes 2019-09-30 18:04:38 +02:00
relaxng.c Undeprecate schema init functions 2022-03-10 01:24:31 +01:00
rngparser.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
runsuite.c Improve buffer allocation scheme 2022-03-06 02:26:22 +01:00
runtest.c Respect --sysconfdir in source files 2022-03-30 14:36:49 +00:00
runxmlconf.c Remove useless __CYGWIN__ checks 2022-02-28 22:58:35 +01:00
save.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00
SAX2.c Deprecate module init and cleanup functions 2022-03-06 15:59:43 +01:00
SAX.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
schematron.c Fix --without-debug build 2022-03-09 22:37:38 +01:00
testapi.c Disable legacy support by default 2022-02-20 21:49:04 +01:00
testAutomata.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
testC14N.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
testchar.c Add explicit casts in testchar.c 2022-01-25 01:59:03 +01:00
testdict.c Remove various unused value assignments 2014-10-27 21:18:57 +08:00
testdso.c warning patches from Peter Breitenlohner serious DTD parsing speedups, 2005-01-25 00:22:52 +00:00
testHTML.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
testlimits.c Remove useless __CYGWIN__ checks 2022-02-28 22:58:35 +01:00
testModule.c Fix some format string warnings with possible format string vulnerability 2016-05-23 15:01:07 +08:00
testOOM.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
testOOMlib.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
testOOMlib.h Remove unneeded #includes 2022-03-04 22:11:49 +01:00
testReader.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
testrecurse.c Remove useless __CYGWIN__ checks 2022-02-28 22:58:35 +01:00
testRegexp.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
testRelax.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
testSAX.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
testSchemas.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
testThreads.c Merge testThreadsWin32.c into testThreads.c 2019-01-06 14:32:28 +01:00
testURI.c add --relative to testURI 2018-11-29 22:11:59 +01:00
testXPath.c Fix calls to deprecated init/cleanup functions 2022-03-29 14:18:31 +02:00
threads.c Revert "Simplify recursive pthread mutex" 2022-03-18 15:50:44 +01:00
timsort.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00
TODO Remove SVN keyword anchors 2022-02-17 19:05:26 +01:00
TODO_SCHEMAS merged the current state of XML Schemas implementation, it is not 2002-04-16 15:50:10 +00:00
tree.c Make xmlStaticCopyNode non-recursive 2022-04-02 19:17:41 +02:00
trio.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
trio.h Fix typos 2020-03-08 17:41:53 +01:00
triodef.h Fix typos 2020-03-08 17:41:53 +01:00
trionan.c Fix typos 2020-03-08 17:41:53 +01:00
trionan.h Fix typos 2020-03-08 17:41:53 +01:00
triop.h Fix typos 2020-03-08 17:41:53 +01:00
triostr.c Fix typos 2020-03-08 17:41:53 +01:00
triostr.h Fix typos 2020-03-08 17:41:53 +01:00
uri.c Remove useless __CYGWIN__ checks 2022-02-28 22:58:35 +01:00
valid.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
xinclude.c Remove DOCBparser 2022-03-04 22:56:21 +01:00
xlink.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
xml2-config.1 xml2-config: Add a --dynamic switch to print only shared libraries 2019-07-17 23:24:24 +10:00
xml2-config.in Remove LIBS from XML_PRIVATE_LIBS 2022-04-03 14:37:45 +02:00
xml2Conf.sh.in Remove LIBS from XML_PRIVATE_LIBS 2022-04-03 14:37:45 +02:00
xmlcatalog.c Respect --sysconfdir in source files 2022-03-30 14:36:49 +00:00
xmlIO.c Add windows includes to xmlIO.c 2022-03-31 01:11:06 +00:00
xmllint.c Respect --sysconfdir in source files 2022-03-30 14:36:49 +00:00
xmlmemory.c Deprecate module init and cleanup functions 2022-03-06 15:59:43 +01:00
xmlmodule.c Remove broken Windows CE support 2022-03-01 00:02:59 +01:00
xmlreader.c Improve buffer allocation scheme 2022-03-06 02:26:22 +01:00
xmlregexp.c Remove unneeded #includes 2022-03-04 22:11:49 +01:00
xmlsave.c Improve buffer allocation scheme 2022-03-06 02:26:22 +01:00
xmlschemas.c Properly fold whitespace around the QName value when validating an XSD schema. 2022-03-02 14:22:36 +00:00
xmlschemastypes.c Undeprecate schema init functions 2022-03-10 01:24:31 +01:00
xmlstring.c Update xmlStrlen() to use POSIX / ISO C strlen() 2022-02-26 16:20:32 +00:00
xmlunicode.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
xmlwriter.c Remove elfgcchack.h 2022-02-20 21:49:04 +01:00
xpath.c fix: xmlXPathParserContext could be double-delete in OOM case. 2022-03-30 06:02:31 +00:00
xpointer.c Fix potential double-free in xmlXPtrStringRangeFunction 2022-03-05 18:27:16 +01:00
xzlib.c Don't check for standard C89 headers 2022-03-02 00:43:54 +01:00
xzlib.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00

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