|
|
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](http://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 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, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)
|
|
|
|
|
|
Libxml2 implements a number of existing standards related to markup languages:
|
|
|
|
|
|
* the XML standard: <http://www.w3.org/TR/REC-xml>
|
|
|
* Namespaces in XML: <http://www.w3.org/TR/REC-xml-names/>
|
|
|
* XML Base: <http://www.w3.org/TR/xmlbase/>
|
|
|
* [RFC 2396](http://www.cis.ohio-state.edu/rfc/rfc2396.txt) : Uniform Resource Identifiers <http://www.ietf.org/rfc/rfc2396.txt>
|
|
|
* XML Path Language (XPath) 1.0: <http://www.w3.org/TR/xpath>
|
|
|
* HTML4 parser: <http://www.w3.org/TR/html401/>
|
|
|
* XML Pointer Language (XPointer) Version 1.0: <http://www.w3.org/TR/xptr>
|
|
|
* XML Inclusions (XInclude) Version 1.0: <http://www.w3.org/TR/xinclude/>
|
|
|
* ISO-8859-x encodings, as well as [rfc2044](http://www.cis.ohio-state.edu/rfc/rfc2044.txt) \[UTF-8\] and [rfc2781](http://www.cis.ohio-state.edu/rfc/rfc2781.txt) \[UTF-16\] Unicode encodings, and more if using iconv support
|
|
|
* the XML standard: <https://www.w3.org/TR/REC-xml>
|
|
|
* Namespaces in XML: <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: <http://www.oasis-open.org/committees/entity/spec-2001-08-06.html>
|
|
|
* Canonical XML Version 1.0: <http://www.w3.org/TR/xml-c14n> and the Exclusive XML Canonicalization CR draft <http://www.w3.org/TR/xml-exc-c14n>
|
|
|
* Relax NG, ISO/IEC 19757-2:2003, <http://www.oasis-open.org/committees/relax-ng/spec-20011203.html>
|
|
|
* W3C XML Schemas Part 2: Datatypes [REC 02 May 2001](http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/)
|
|
|
* W3C [xml:id](http://www.w3.org/TR/xml-id/) Working Draft 7 April 2004
|
|
|
* 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 Part 2: Datatypes [REC 02 May 2001](https://www.w3.org/TR/2001/REC-xmlschema-2-20010502/)
|
|
|
* 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](http://www.oasis-open.org/committees/xml-conformance/).
|
|
|
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) <http://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](http://www.cis.ohio-state.edu/rfc/rfc959.txt) : libxml2 implements a basic FTP client code
|
|
|
* [RFC 1945](http://www.cis.ohio-state.edu/rfc/rfc1945.txt) : HTTP/1.0, again a basic HTTP client code
|
|
|
* 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
|
|
|
|
|
|
A partial implementation of [XML Schemas Part 1: Structure](http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/) is being worked on but it would be far too early to make any conformance statement about it at the moment.
|
|
|
A partial implementation of [XML Schemas Part 1: Structure](https://www.w3.org/TR/2001/REC-xmlschema-1-20010502/) is being worked on but it would be far too early to make any conformance statement about it at the moment.
|
|
|
|
|
|
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](http://www.w3.org/TR/xpath), [XPointer](http://www.w3.org/TR/xptr) and [XInclude](http://www.w3.org/TR/xinclude) implementations.
|
|
|
* 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](http://www.w3.org/DOM/) interfaces.
|
|
|
* 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](http://www.opensource.org/licenses/mit-license.html). See the Copyright file in the distribution for the precise wording.
|
|
|
* 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.
|
|
|
|
|
|
## HTML Documentation
|
|
|
|
... | ... | @@ -54,41 +54,32 @@ Generated HTML documentation is available via GitLab Pages: |
|
|
|
|
|
## Mailing list
|
|
|
|
|
|
There is a mailing-list [xml@gnome.org](mailto:xml@gnome.org) for libxml, with an [on-line archive](http://mail.gnome.org/archives/xml/). To subscribe to this list, please visit the [associated web](http://mail.gnome.org/mailman/listinfo/xml) page and follow the instructions.
|
|
|
There is a mailing-list [xml@gnome.org](mailto:xml@gnome.org) for libxml, with an [on-line archive](https://mail.gnome.org/archives/xml/). To subscribe to this list, please visit the [associated web](https://mail.gnome.org/mailman/listinfo/xml) page and follow the instructions.
|
|
|
|
|
|
## 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).
|
|
|
* There is another [C++ wrapper based on the gdome2 bindings](http://libgdome-cpp.berlios.de/) maintained by Tobias Peters.
|
|
|
* and a third C++ wrapper by Peter Jones <[pjones@pmade.org](mailto:pjones@pmade.org)>\
|
|
|
Website: <http://pmade.org/pjones/software/xmlwrapp/>
|
|
|
* XML::LibXML [Perl bindings](http://cpan.uwinnipeg.ca/dist/XML-LibXML) are available on CPAN, as well as XML::LibXSLT [Perl libxslt bindings](http://cpan.uwinnipeg.ca/dist/XML-LibXSLT).
|
|
|
* If you're interested into scripting XML processing, have a look at [XSH](http://xsh.sourceforge.net/) an XML editing shell based on Libxml2 Perl bindings.
|
|
|
* [Dave Kuhlman](mailto:dkuhlman@cutter.rexx.com) provides an earlier version of the libxml/libxslt [wrappers for Python](http://www.rexx.com/\~dkuhlman).
|
|
|
* Gopal.V and Peter Minten develop [libxml#](http://savannah.gnu.org/projects/libxmlsharp), a set of C# libxml2 bindings.
|
|
|
* Petr Kozelka provides [Pascal units to glue libxml2](http://sourceforge.net/projects/libxml2-pas) with Kylix, Delphi and other Pascal compilers.
|
|
|
* Uwe Fechner also provides [idom2](http://sourceforge.net/projects/idom2-pas/), a DOM2 implementation for Kylix2/D5/D6 from Borland.
|
|
|
* There is [bindings for Ruby](http://libxml.rubyforge.org/) and libxml2 bindings are also available in Ruby through the [libgdome-ruby](http://libgdome-ruby.berlios.de/) module maintained by Tobias Peters.
|
|
|
* [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](http://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](http://www.satimage.fr/software/en/xml_suite.html) provides [XMLLib osax](http://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/project/showfiles.php?group_id=51305&package_id=45182) wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.
|
|
|
* [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](https://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](mailto:igor@zlatkovic.com) is now the maintainer of the Windows port, [he provides binaries](http://www.zlatkovic.com/projects/libxml/index.html)
|
|
|
* [Gary Pennington](mailto:Gary.Pennington@sun.com) provides [Solaris binaries](http://garypennington.net/libxml2/)
|
|
|
* [Matt Sergeant](http://mail.gnome.org/archives/xml/2001-March/msg00014.html) developed [XML::LibXSLT](http://axkit.org/download/), a Perl wrapper for libxml2/libxslt as part of the [AxKit XML application server](http://axkit.com/)
|
|
|
* [Felix Natter](mailto:fnatter@gmx.net) and [Geert Kloosterman](mailto:geertk@ai.rug.nl) provide [an emacs module](/GNOME/libxml2/-/blob/master/doc/libxml-doc.el) to lookup libxml(2) functions documentation
|
|
|
* [Ziying Sherwin](mailto:sherwin@nlm.nih.gov) provided man pages
|
|
|
* there is a module for [libxml/libxslt support in OpenNSD/AOLServer](http://acs-misc.sourceforge.net/nsxml.html)
|
|
|
* [Dave Kuhlman](mailto:dkuhlman@cutter.rexx.com) provided the first version of libxml/libxslt [wrappers for Python](http://www.rexx.com/\~dkuhlman)
|
|
|
* Petr Kozelka provides [Pascal units to glue libxml2](http://sourceforge.net/projects/libxml2-pas) with Kylix and Delphi and other Pascal compilers
|
|
|
* [Aleksey Sanin](mailto:aleksey@aleksey.com) implemented the [XML Canonicalization and XML Digital Signature](http://www.w3.org/Signature/) [implementations for libxml2](http://www.aleksey.com/xmlsec/)
|
|
|
* [Steve Ball](mailto:Steve.Ball@explain.com.au) and contributors maintain [tcl bindings for libxml2 and libxslt](http://tclxml.sourceforge.net/), as well as [tkxmllint](http://tclxml.sf.net/tkxmllint.html) a GUI for xmllint and [tkxsltproc](http://tclxml.sf.net/tkxsltproc.html) a GUI for xsltproc. |
|
|
\ No newline at end of file |
|
|
* Igor Zlatkovic is now the maintainer of the Windows port, [he provides binaries](https://www.zlatkovic.com/projects/libxml/index.html)
|
|
|
* Felix Natter and Geert Kloosterman provide [an emacs module](/GNOME/libxml2/-/blob/master/doc/libxml-doc.el) to lookup libxml(2) functions documentation
|
|
|
* 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 |