|
|
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](http://xmlsoft.org/python.html) 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
|
|
|
* 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
|
|
|
|
|
|
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/).
|
|
|
|
|
|
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
|
|
|
* 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.
|
|
|
|
|
|
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.
|
|
|
* 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.
|
|
|
* 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.
|
|
|
|
|
|
## Documentation
|
|
|
|
|
|
TODO
|
|
|
|
|
|
## 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/) ([old](http://xmlsoft.org/messages)). To subscribe to this list, please visit the [associated web](http://mail.gnome.org/mailman/listinfo/xml) page and follow the instructions.
|
|
|
|
|
|
## 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](http://xmlsoft.org/libxml-doc.el) to lookup libxml(2) functions documentation
|
|
|
* [Ziying Sherwin](mailto:sherwin@nlm.nih.gov) provided [man pages](http://xmlsoft.org/messages/0488.html)
|
|
|
* 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 |