|
|
## Official releases
|
|
|
|
|
|
Official releases can be downloaded from <https://download.gnome.org/sources/libxml2/>
|
|
|
|
|
|
## HTML Documentation
|
|
|
|
|
|
Generated HTML documentation is available via GitLab Pages:
|
|
|
|
|
|
- [API documentation](https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/)
|
|
|
- [Tutorial](Tutorial)
|
|
|
- [Examples](https://gitlab.gnome.org/GNOME/libxml2/-/tree/master/example)
|
|
|
- [`xmllint` man page](https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html)
|
|
|
- [`xmlcatalog` man page](https://gnome.pages.gitlab.gnome.org/libxml2/xmlcatalog.html)
|
|
|
|
|
|
## History
|
|
|
|
|
|
Libxml2 is the XML C parser and toolkit developed for the GNOME project (but usable outside of the GNOME platform), it is free software available under the [MIT License](https://www.opensource.org/licenses/mit-license.html). XML itself is a metalanguage to design markup languages, i.e. text language where semantic and structure are added to the content using extra "markup" information enclosed between angle brackets. HTML is the most well-known markup language. Though the library is written in C a variety of language bindings make it available in other environments.
|
|
|
|
|
|
Libxml2 is known to be very portable, the library should build and work without serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, MacOS, RISC Os, OS/2, VMS, QNX, MVS, ...)
|
|
|
|
|
|
Libxml2 implements a number of existing standards related to markup languages:
|
|
|
|
|
|
* the XML 1.0 standard: <https://www.w3.org/TR/REC-xml>
|
|
|
* Namespaces in XML 1.0: <https://www.w3.org/TR/REC-xml-names/>
|
|
|
* XML Base: <https://www.w3.org/TR/xmlbase/>
|
|
|
* RFC 2396: Uniform Resource Identifiers <https://www.ietf.org/rfc/rfc2396.txt>
|
|
|
* XML Path Language (XPath) 1.0: <https://www.w3.org/TR/xpath>
|
|
|
* HTML4 parser: <https://www.w3.org/TR/html401/>
|
|
|
* XML Pointer Language (XPointer) Version 1.0: <https://www.w3.org/TR/xptr>
|
|
|
* XML Inclusions (XInclude) Version 1.0: <https://www.w3.org/TR/xinclude/>
|
|
|
* ISO-8859-x encodings, as well as [rfc2044](https://www.ietf.org/rfc/rfc2044.txt) \[UTF-8\] and [rfc2781](https://www.ietf.org/rfc/rfc2781.txt) \[UTF-16\] Unicode encodings, and more if using iconv support
|
|
|
* part of SGML Open Technical Resolution TR9401:1997
|
|
|
* XML Catalogs Working Draft 06 August 2001: <https://www.oasis-open.org/committees/entity/spec-2001-08-06.html>
|
|
|
* Canonical XML Version 1.0: <https://www.w3.org/TR/xml-c14n> and the Exclusive XML Canonicalization CR draft <https://www.w3.org/TR/xml-exc-c14n>
|
|
|
* Relax NG, ISO/IEC 19757-2:2003, <https://www.oasis-open.org/committees/relax-ng/spec-20011203.html>
|
|
|
* W3C XML Schemas 1.0: <https://www.w3.org/TR/xmlschema-0/>
|
|
|
* W3C [xml:id](https://www.w3.org/TR/xml-id/) Working Draft 7 April 2004
|
|
|
|
|
|
In most cases libxml2 tries to implement the specifications in a relatively strictly compliant way. As of release 2.4.16, libxml2 passed all 1800+ tests from the [OASIS XML Tests Suite](https://www.oasis-open.org/committees/xml-conformance/).
|
|
|
|
|
|
To some extent libxml2 provides support for the following additional specifications but doesn't claim to implement them completely:
|
|
|
|
|
|
* Document Object Model (DOM) <https://www.w3.org/TR/DOM-Level-2-Core/> the document model, but it doesn't implement the API itself, gdome2 does this on top of libxml2
|
|
|
* [RFC 959](https://www.ietf.org/rfc/rfc959.txt) : libxml2 implements a basic FTP client code
|
|
|
* [RFC 1945](https://www.ietf.org/rfc/rfc1945.txt) : HTTP/1.0, again a basic HTTP client code
|
|
|
* SAX: a SAX2 like interface and a minimal SAX1 implementation compatible with early expat versions
|
|
|
|
|
|
Here are some key points about libxml:
|
|
|
|
|
|
* Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.
|
|
|
* Libxml2 can do DTD validation at parse time, using a parsed document instance, or with an arbitrary DTD.
|
|
|
* Libxml2 includes complete [XPath 1.0](https://www.w3.org/TR/xpath), [XPointer](http://www.w3.org/TR/xptr) and [XInclude 1.0](https://www.w3.org/TR/xinclude) implementations.
|
|
|
* It is written in plain C, making as few assumptions as possible, and sticking closely to ANSI C/POSIX for easy embedding. Works on Linux/Unix/Windows, ported to a number of other platforms.
|
|
|
* Basic support for HTTP and FTP client allowing applications to fetch remote resources.
|
|
|
* The design is modular, most of the extensions can be compiled out.
|
|
|
* The internal document representation is as close as possible to the [DOM](https://www.w3.org/DOM/) interfaces.
|
|
|
* Libxml2 also has a [SAX like interface](http://www.megginson.com/SAX/index.html); the interface is designed to be compatible with [Expat](http://www.jclark.com/xml/expat.html).
|
|
|
* This library is released under the [MIT License](https://www.opensource.org/licenses/mit-license.html). See the Copyright file in the distribution for the precise wording.
|
|
|
|
|
|
## Language bindings
|
|
|
|
|
|
There are a number of language bindings and wrappers available for libxml2, the list below is not exhaustive.
|
|
|
|
|
|
* [Libxml++](https://libxmlplusplus.github.io/libxmlplusplus/) seems the most up-to-date C++ bindings for libxml2, check the [documentation](https://developer-old.gnome.org/libxml++/) and the [examples](https://github.com/libxmlplusplus/libxmlplusplus/tree/master/examples).
|
|
|
* [xmlwrapp](https://vslavik.github.io/xmlwrapp/), a C++ library built atop libxml2.
|
|
|
* XML::LibXML [Perl bindings](https://metacpan.org/pod/XML::LibXML) are available on CPAN, as well as XML::LibXSLT [Perl libxslt bindings](https://metacpan.org/pod/XML::LibXSLT).
|
|
|
* If you're interested into scripting XML processing, have a look at [XSH](https://xsh.sourceforge.net/) an XML editing shell based on Libxml2 Perl bindings.
|
|
|
* Petr Kozelka provides [Pascal units to glue libxml2](https://sourceforge.net/projects/libxml2-pas) with Kylix, Delphi and other Pascal compilers.
|
|
|
* Uwe Fechner also provides [idom2](https://sourceforge.net/projects/idom2-pas/), a DOM2 implementation for Kylix2/D5/D6 from Borland.
|
|
|
* There are [bindings for Ruby](https://rubygems.org/gems/libxml-ruby) and libxml2 bindings are also available in Ruby through [Nokogiri](https://nokogiri.org/).
|
|
|
* Steve Ball and contributors maintains [libxml2 and libxslt bindings for Tcl](http://tclxml.sourceforge.net/).
|
|
|
* libxml2 and libxslt are the default XML libraries for PHP5.
|
|
|
* [LibxmlJ](https://savannah.gnu.org/projects/classpathx/) is an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and libxslt as part of GNU ClasspathX project.
|
|
|
* Patrick McPhee provides Rexx bindings for libxml2 and libxslt, look for [RexxXML](http://www.interlog.com/\~ptjm/software.html).
|
|
|
* Satimage provides [XMLLib osax](https://www.satimage.fr/software/en/downloads_osaxen.html). This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT. Also includes commands for Property-lists (Apple's fast lookup table XML format.)
|
|
|
* Francesco Montorsi developed [wxXml2](https://sourceforge.net/projects/wxcode/) wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.
|
|
|
|
|
|
## Contributions
|
|
|
|
|
|
* Bjorn Reese, William Brack and Thomas Broyer have provided a number of patches, Gary Pennington worked on the validation API, threading support and Solaris port.
|
|
|
* John Fleck helps maintaining the documentation and man pages.
|
|
|
* Igor Zlatkovic provided the original Windows port.
|
|
|
* Ziying Sherwin provided man pages.
|
|
|
* Dave Kuhlman provided the first version of libxml/libxslt wrappers for Python.
|
|
|
* Aleksey Sanin implemented the [XML Canonicalization and XML Digital Signature](https://www.w3.org/Signature/) [implementations for libxml2](https://www.aleksey.com/xmlsec/). |
|
|
\ No newline at end of file |