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-02-19 19:26:42 +01:00
bakefile Fix typos 2020-03-08 17:41:53 +01:00
doc Remove SVN keyword anchors 2022-02-17 19:05:26 +01:00
example Large batch of typo fixes 2019-09-30 18:04:38 +02:00
fuzz Fix fuzz/.gitignore after fixing VPATH build 2022-02-19 19:26:42 +01:00
include Remove xmlwin32version.h 2022-02-16 19:55:30 +01:00
macos configure: remove unused checks for functions 2022-01-16 14:34:37 +01:00
optim Fix typos 2020-03-08 17:41:53 +01:00
os400 Remove xmlwin32version.h 2022-02-16 19:55:30 +01:00
python Remove SVN keyword anchors 2022-02-17 19:05:26 +01:00
result Fix double counting of CRLF in comments 2022-02-07 20:54:07 +01:00
test Fix double counting of CRLF in comments 2022-02-07 20:54:07 +01:00
vms configure: remove unused checks for functions 2022-01-16 14:34:37 +01:00
VxWorks apply a couple of fixes based on a Coverity report forwarded by Derrick 2008-06-10 14:56:11 +00:00
win32 Remove CVS and SVN-related code 2022-02-13 23:35:18 +01:00
xstc Fix typos 2020-03-08 17:41:53 +01:00
.gitattributes Fix .gitattributes 2020-07-23 20:46:42 +02:00
.gitignore Add some generated test files to .gitignore 2019-01-06 14:25:18 +01:00
.gitlab-ci.yml Try again to only build GitLab Pages on main repo 2022-02-12 21:36:27 +01: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 Reset HTML parser input before reporting error 2020-07-11 14:39:52 +02:00
buf.h Fix and add const qualifiers 2014-10-13 16:06:21 +08:00
build_glob.py
c14n.c Fix return value of xmlC14NDocDumpMemory 2020-06-24 20:07:32 +02:00
catalog.c Fix memory leak in xmlParseSGMLCatalog 2022-01-16 14:13:26 +01:00
check-relaxng-test-suite2.py patches from John Carr to start cleaning up 'make diskcheck' problems c.f. 2008-01-11 07:19:24 +00:00
check-relaxng-test-suite.py patches from John Carr to start cleaning up 'make diskcheck' problems c.f. 2008-01-11 07:19:24 +00:00
check-xinclude-test-suite.py Large batch of typo fixes 2019-09-30 18:04:38 +02:00
check-xml-test-suite.py Large batch of typo fixes 2019-09-30 18:04:38 +02:00
check-xsddata-test-suite.py patches from John Carr to start cleaning up 'make diskcheck' problems c.f. 2008-01-11 07:19:24 +00:00
chvalid.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
chvalid.def Remove executable bit from non-executable files 2019-09-16 15:48:59 +02:00
CMakeLists.txt Remove xmlwin32version.h 2022-02-16 19:55:30 +01:00
config.h.cmake.in configure: remove unused checks for functions 2022-01-16 14:34:37 +01:00
configure.ac Support custom prefix when installing Python module 2022-02-14 17:44:29 +01: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 Fix typos 2020-03-08 17:41:53 +01:00
dict.c Fix typos 2020-03-08 17:41:53 +01:00
DOCBparser.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
elfgcchack.h Rebuild docs 2019-09-30 18:05:45 +02:00
enc.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00
encoding.c Fix integer conversion warning in xmlIconvWrapper 2022-01-25 03:07:30 +01:00
entities.c Validate UTF8 in xmlEncodeEntities 2021-04-22 11:57:32 +02:00
error.c Fix error reporting with xi:fallback 2020-08-17 01:17:39 +02:00
genChRanges.py Large batch of typo fixes 2019-09-30 18:04:38 +02:00
gentest.py Fix typos 2020-03-08 17:41:53 +01:00
genUnicode.py Add const in five places to move 1 KiB to .rdata 2017-08-28 21:27:03 +02:00
global.data Fix SetGenericErrorFunc and SetStructured clash 2009-08-24 17:34:25 +02:00
globals.c Fix typos 2020-03-08 17:41:53 +01:00
hash.c Fix integer conversion warnings in hash.c 2022-01-25 03:15:12 +01:00
HTMLparser.c Also register HTML document nodes 2022-02-01 16:38:29 +01:00
HTMLtree.c Fix whitespace when serializing empty HTML documents 2021-06-07 15:09:53 +02:00
legacy.c Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). 2014-02-10 10:32:45 +08: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 Redirect links to xmlsoft.org 2022-02-13 23:10:00 +01:00
libxml2.syms Add xmlPopOutputCallbacks 2020-02-11 11:32:23 +01:00
libxml-2.0-uninstalled.pc.in build: Add @LZMA_LIBS@ to libxml’s pkg-config files 2013-10-29 17:35:36 +08:00
libxml-2.0.pc.in build: Add @LZMA_LIBS@ to libxml’s pkg-config files 2013-10-29 17:35:36 +08:00
libxml.3 libxml(3) manpage typo fix 2012-08-17 11:59:01 +08:00
libxml.h Large batch of typo fixes 2019-09-30 18:04:38 +02: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 Fix typos 2020-03-08 17:41:53 +01:00
Makefile.am Fix distribution after README change 2022-02-14 03:45:03 +01:00
Makefile.tests Fix typos 2020-03-08 17:41:53 +01:00
nanoftp.c Fix typos 2020-03-08 17:41:53 +01:00
nanohttp.c Fix typos 2020-03-08 17:41:53 +01:00
NEWS Redirect links to xmlsoft.org 2022-02-13 23:10:00 +01:00
parser.c Fix double counting of CRLF in comments 2022-02-07 20:54:07 +01:00
parserInternals.c Fix memory leak in xmlNewInputFromFile 2022-01-16 14:15:09 +01:00
pattern.c Large batch of typo fixes 2019-09-30 18:04:38 +02:00
README.md Rework README 2022-02-14 03:00:09 +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
regressions.py new files for running regression tests under Python. Not yet complete, but 2004-06-27 02:07:51 +00:00
regressions.xml new files for running regression tests under Python. Not yet complete, but 2004-06-27 02:07:51 +00:00
relaxng.c Fix memory leak in xmlRelaxNGNewDocParserCtxt 2022-01-16 14:24:45 +01:00
rngparser.c Fix typos: dictio{ nn -> n }ar{y,ies} 2016-04-15 22:22:48 +08:00
runsuite.c Large batch of typo fixes 2019-09-30 18:04:38 +02:00
runtest.c Add explicit casts in runtest.c 2022-01-25 03:07:30 +01:00
runxmlconf.c Fix typos 2020-03-08 17:41:53 +01:00
save.h Large batch of typo fixes 2019-09-30 18:04:38 +02:00
SAX2.c Fix casting of line numbers in SAX2.c 2022-01-25 03:20:28 +01:00
SAX.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
schematron.c Fix typos 2020-03-08 17:41:53 +01:00
testapi.c Fix unused function warning in testapi.c 2022-02-04 14:42:16 +01:00
testAutomata.c Remove executable bit from non-executable files 2019-09-16 15:48:59 +02:00
testC14N.c Fix Windows compiler warning in testC14N.c 2019-01-06 14:32:28 +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 Big space and tab cleanup 2012-09-11 13:26:36 +08:00
testlimits.c Large batch of typo fixes 2019-09-30 18:04:38 +02:00
testModule.c Fix some format string warnings with possible format string vulnerability 2016-05-23 15:01:07 +08:00
testOOM.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
testOOMlib.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
testOOMlib.h
testReader.c Remove executable bit from non-executable files 2019-09-16 15:48:59 +02:00
testrecurse.c Large batch of typo fixes 2019-09-30 18:04:38 +02:00
testRegexp.c Fix Regextests 2019-09-25 15:27:45 +02:00
testRelax.c Fix -Wcast-function-type warnings (GCC 8) 2019-01-06 14:25:12 +01:00
testSAX.c Big space and tab cleanup 2012-09-11 13:26:36 +08:00
testSchemas.c Fix -Wcast-function-type warnings (GCC 8) 2019-01-06 14:25:12 +01: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 Big space and tab cleanup 2012-09-11 13:26:36 +08:00
threads.c Fix potentially-uninitialized critical section in Win32 DLL builds 2020-02-11 11:34:15 +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
tree.c Fix xmlSetTreeDoc with entity references 2022-02-07 22:18:27 +01:00
trio.c Fix typos 2020-03-08 17:41:53 +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 Add explicit cast in xmlURIUnescapeString 2022-01-25 01:39:41 +01:00
valid.c Fix typos 2020-03-08 17:41:53 +01:00
xinclude.c xmlAddChild() and xmlAddNextSibling() may not attach their second argument 2022-01-25 16:30:48 +00:00
xlink.c Fix libz and liblzma detection 2017-11-27 14:33:37 +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 Fix xml2-config error code 2019-11-11 11:29:17 +01:00
xml2Conf.sh.in xml2-config: Add a --dynamic switch to print only shared libraries 2019-07-17 23:24:24 +10:00
xmlcatalog.c Remove duplicated code in xmlcatalog 2022-01-16 14:28:45 +01:00
xmlIO.c Fix leak in __xmlOutputBufferCreateFilename 2022-01-16 14:26:14 +01:00
xmllint.c Redirect links to xmlsoft.org 2022-02-13 23:10:00 +01:00
xmlmemory.c Add suffix to unsigned constant in xmlmemory.c 2022-01-25 03:07:30 +01:00
xmlmodule.c Large batch of typo fixes 2019-09-30 18:04:38 +02:00
xmlreader.c Avoid call stack overflow with XML reader and recursive XIncludes 2020-11-09 17:55:44 +01:00
xmlregexp.c Patch to forbid epsilon-reduction of final states 2021-07-06 21:59:25 +02:00
xmlsave.c Fix regression in xmlNodeDumpOutputInternal 2021-05-25 11:16:13 +02:00
xmlschemas.c Fix handling of XSD with empty namespace 2022-02-03 23:31:19 +01:00
xmlschemastypes.c Fix regression in RelaxNG pattern matching 2022-02-13 23:04:29 +01:00
xmlstring.c Avoid potential integer overflow in xmlstring.c 2022-01-28 16:27:12 +01:00
xmlunicode.c Add const in five places to move 1 KiB to .rdata 2017-08-28 21:27:03 +02:00
xmlwriter.c Fix error code in xmlTextWriterStartDocument 2019-10-14 17:06:36 +02:00
xpath.c Fix memory leak in xmlXPathCompNodeTest 2022-01-16 15:30:02 +01:00
xpointer.c Don't normalize namespace URIs in XPointer xmlns() scheme 2022-02-04 14:00:09 +01:00
xzlib.c Large batch of typo fixes 2019-09-30 18:04:38 +02: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

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