blob: 2cbbe8527a8e9113a01dd1facd67acba93e3ed5f [file] [log] [blame]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Expat XML Parser</title>
<link rel="STYLESHEET" href="style.css" type="text/css" />
<style type="text/css">
body { margin: 0px; }
<table cellspacing="0" cellpadding="0" width="100%">
<td class="corner"><img src="expat.png" alt="(Expat logo)" /></td>
<td class="banner"><h2>The Expat XML Parser</h2></td>
<td class="navbar"></td>
<td class="content">
<p>Expat is an XML parser library written in C. It is a
stream-oriented parser in which an application registers handlers for
things the parser might find in the XML document (like start tags).
An <a href=""
>introductory article</a> on using Expat is available on
<a href=""></a>.</p>
<a href=""
>Expat project page (includes downloads)</a></li>
<a href=""
>Mailing lists</a></li>
<a href="#wrappers"
>3rd-party wrappers (SAX, DOM, other language bindings)</a></li>
<a href=""
>Git repository</a>
(<a href="dev/cvs.html"
>CVS repository</a>
(<a href=""
>browse online</a>))</li>
<a href=""
>Bug reports</a></li>
<a href="dev/">Notes for Expat maintainers</a></li>
<p>This project aims to maintain Expat for both current and future
users while improving the API to allow more reliable and robust access
from "scripting" languages such as Python and Perl. We invite the
community to participate on the mailing lists to help shape the future
of Expat.</p>
<h3 id="news">News</h3>
<dt><em>18 June 2016</em>,
Expat 2.2.0 released.
<dd><p>Release 2.2.0 includes security &amp; other bug fixes.</p>
<h4>Security fixes</h4>
<dt><a href="">CVE-2016-0718</a>
(<a href="">issue 537</a>)</dt>
<dd>Fix crash on malformed input</dd>
<dt><a href="">CVE-2016-4472</a></dt>
<dd>Improve insufficient fix to
<a href="">CVE-2015-1283</a> /
<a href="">CVE-2015-2716</a>
introduced with Expat 2.1.1</dd>
<dt><a href="">CVE-2016-5300</a>
(<a href="">issue 499</a>)</dt>
<dd>Use more entropy for hash initialization than the original fix to
<a href="">CVE-2012-0876</a></dd>
<dt><a href="">CVE-2012-6702</a>
(<a href="">issue 519</a>)</dt>
<dd>Resolve troublesome internal call to srand that was introduced
with Expat 2.1.0 when addressing <a href="">CVE-2012-0876</a>
(<a href="">issue 496</a>)</dd>
<h4>Bug fixes</h4>
<li>Fix uninitialized reads of size 1 (e.g. in <code>little2_updatePosition</code>)</li>
<li>Fix detection of UTF-8 character boundaries</li>
<h4>Other changes</h4>
<li>Fix compilation for Visual Studio 2010
(<a href="">bug 532</a>)</li>
<li>Autotools: Resolve use of &quot;$&lt;&quot; to better support bmake</li>
<li>Autotools: Add QA script &quot;; (and make target &quot;qa&quot;)</li>
<li>Autotools: Respect <code>CXXFLAGS</code> if given</li>
<li>Autotools: Fix &quot;make run-xmltest&quot;</li>
<li>Autotools: Have &quot;make run-xmltest&quot; check for expected output</li>
<li>CMake: Fix static build (<code>BUILD_shared=OFF</code>) on Windows
(<a href="">patch 90</a>)</li>
<li>CMake: Add soversion, support <code>-DNO_SONAME=yes</code> to bypass
(<a href="">bug 536</a>)</li>
<li>CMake: Add suffix &quot;d&quot; to differentiate debug from release
(<a href="">bug 323</a>)</li>
<li>CMake: Define <code>WIN32</code> with CMake on Windows</li>
<li>Annotate memory allocators for GCC</li>
<li>Address all currently known compile warnings</li>
<li>Make sure that API symbols remain visible despite <code>-fvisibility=hidden</code></li>
<li>Remove executable flag from source files</li>
<li>Resolve <code>COMPILED_FROM_DSP</code> in favor of <code>WIN32</code></li>
<h4>Special thanks to</h4>
<li>Björn Lindahl</li>
<li>Christian Heimes</li>
<li>Cristian Rodríguez</li>
<li>Daniel Krügler</li>
<li>Gustavo Grieco</li>
<li>Karl Waclawek</li>
<li>László Böszörményi</li>
<li>Marco Grassi</li>
<li>Pascal Cuoq</li>
<li>Sergei Nikulov</li>
<li>Thomas Beutlich</li>
<li>Warren Young</li>
<li>Yann Droneaud</li>
<dt><em>12 March 2016</em>,
Expat 2.1.1 released.
<dd><p>Release 2.1.1 includes security &amp; other bug fixes.</p>
<h4>Security fixes</h4>
<li><a href="">CVE-2015-1283</a>
Multiple integer overflows in the <code>XML_GetBuffer</code> function
(<a href="">bug 528</a>)</li>
<h4>Bug fixes</h4>
<li>Fix potential null pointer dereference
(<a href="">bug 502</a>)</li>
<li>Symbol <code>XML_SetHashSalt</code> was not exported
(<a href="">bug 520</a>)</li>
<li>Output of <code>xmlwf -h</code> was incomplete</li>
<h4>Other changes</h4>
<li>Document behavior of calling <code>XML_SetHashSalt</code> with salt <code>0</code>
(<a href="">bug 503</a>)</li>
<li>Minor improvements to man page <code>xmlwf(1)</code></li>
<li>Improvements to the <em>experimental</em> CMake build system</li>
<li>libtool now invoked with <code>--verbose</code></li>
<dt><em>24 March 2012</em>,
Expat 2.1.0 released.
<dd><p>Release 2.1.0 includes security &amp; other bug fixes, new
features, and updated build support.</p>
<h4>Security fixes</h4>
<li>Memory leak in poolGrow (<a
<li>Resource leak in readfilemap.c (<a
<li>Hash DOS attack (<a
<li>Buffer over-read and crash in big2_toUtf8 (<a
<li>Parser crash with special UTF-8 sequences (<a
<h4>New features</h4>
<li>Added function XML_SetHashSalt that allows setting an initial
value (salt) for hash calculations (part of the fix for bug <a
<li>When compiled with XML_ATTR_INFO defined, adds new API member
XML_GetAttributeInfo() that allows retrieving the byte offsets
for attribute names and values (patch <a
<li>Added CMake build system (bug <a
>2990652</a>, patch <a
<li>Added run-benchmark target to - relies on testdata
module present in the same relative location as in the repository.
<h4>Bug fixes</h4>
<li>Harmful XML_ParserCreateNS suggestion (<a
<li>CVE-2012-1147 - Resource leak in readfilemap.c (<a
<li>Expat build fails on linux-amd64 with gcc version&gt;=4.1 -O3 (<a
<li>Build modifications using autoreconf instead of (<a
>1983953</a>, <a
>2517952</a>, <a
>2517962</a>, <a
<li>OBJEXT and EXEEXT support while building (<a
>2815947</a>, <a
<li>CVE-2009-3720 - Parser crash with special UTF-8 sequences (<a
<li>xmlwf should return non-zero exit status if not well-formed (<a
<li>Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml (<a
<li>Dangling positionPtr after error (<a
<li>CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8() (<a
<li>CVE-2012-1148 - Memory leak in poolGrow (<a
<li>UNEXPECTED_STATE with a trailing "%" in entity value (<a
<li>Unitialized memory returned from XML_Parse (<a
<li>make check fails on mingw-w64 (<a
<dt><em>5 June 2007</em>,
Expat 2.0.1 released.
<dd><p>Release 2.0.1 of the Expat XML parser is a bugfix release
resolving both code and build related issues. Changes include:
<li>Fixed: The character data handler's calling of XML_StopParser()
was not handled properly; if the parser was stopped and the handler
set to NULL, the parser would segfault.</li>
<li>Fixed: Expat failed on EBCDIC systems as it assumed some character
constants to be ASCII encoded.</li>
<li>Minor cleanups of the test harness.</li>
<li>Minor fixes for xmlwf and example programs.</li>
<li>Fixes and improvements for the Windows platform.
New Windows directory structure.</li>
<li>Build fixes for various platforms: HP-UX, Tru64, Solaris 9.</li>
<li>Build fixes for Unix:<br/>
- Refreshed config.sub/config.guess.<br/>
- Support both, DESTDIR and INSTALL_ROOT, without relying on GNU-Make specific features.<br/>
- Patched to work better with Intel compiler.<br/>
- Fixes to to have make check work correctly.</li>
<li>Added Open Watcom support.</li>
<dt><em>11 January 2006</em>,
Expat 2.0.0 released.
<dd><p>Release 2.0.0 of the Expat XML parser is the end point of the
1.95.X series of releases. The goal was to solidify and stabilize
the implementation of the given API, to add desirable features as
long as they fit with the API, and to keep the API backwards compatible
if extensions were required. Changes include:
<ul><li>Fixed headers for use from C++.</li>
<li>XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
now return unsigned integers.</li>
<li>Added XML_LARGE_SIZE switch to enable 64-bit integers for
byte indexes and line/column numbers.</li>
<li>Added support for AmigaOS.</li>
<li>Some mostly minor bug fixes. SF issues include: 1006708,
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.</li>
<p><a href="oldnews.html">Old news archive</a></p>
<h3 id="wrappers">References &amp; 3rd-party Wrappers</h3>
<p>If you know of any additional articles or resources which should be
linked to from this page, please send email to <a
href="">Fred Drake (fdrake&#64;</a>.
We're especially interested in links to tutorial information and open
source interfaces to Expat from languages other than C.</p>
<a href=""
>James Clark's original Expat page</a>, for Expat 1.2 and
<a href=""
>Introductory article</a> on using Expat on
<a href=""></a></li>
<a href="">LuaExpat</a> is a
wrapper around Expat for the <a href="">Lua</a>
programming language. The <a href=
"">LuaSOAP</a> library is a <a
href="">SOAP</a> implementation
built on top of <a href= ""
Perl's <code>XML::Parser</code> module is a wrapper built around a
binding to Expat in the <code>XML::Parser::Expat</code> module.</li>
<a href=""
>Documentation for the Python interface to Expat</a>, part of the
standard documentation for Python.</li>
<a href=""
>SAXExpat.NET</a>, a <a href="">.NET</a>
wrapper for Expat, conforming to the
<a href="">SAX for .NET</a> specifications.</li>
The <a href="">Simple C Expat Wrapper</a>
is a wrapper around Expat that provides a light-weight object model
somewhat like a DOM.</li>
<!-- Alex Conchillo Flaque: aconchillo at -->
<em><a href=""
title="C++ Wrappers for the Expat XML Parser">C++ Wrappers
for the Expat XML Parser</a></em>, an article by Tim Smith
providing object-oriented wrappers for Expat. The wrappers use
some MFC-biased naming, but look interesting.</li>
<a href="" title="Arabica"
>Arabica</a> -- an XML Parser toolkit for C++ programmers, with
SAX2 implementations based on several parsers, including Expat.</li>
<a href=""
>ExpatMM -- C++ interface to Expat</a></li>
<a href=""
>SAX2 Wrapper for using Expat in Delphi,</a>
based on
<a href=""
>"SAX for Pascal"</a>
interface specs</li>
The <a href=""
>TclXML project</a> includes a <a href=""
>Tcl</a> binding for Expat</li>
<a href=""
>tDOM</a> is an alternate package providing XML support for <a
href="" >Tcl</a>, based in part on
<a href=""
>Article on using Expat from PHP</a> on
<a href="">&lt;?PHPBuilder?&gt;</a>
<br />(broken into lots of tiny pieces)</li>
<a href=""
>Objective-C interface to Expat</a></li>
<a href="">OCaml Expat</a> is a
wrapper around Expat for the <a href=""
>Objective Caml</a> language.</li>
<a href=""
>Ruby interface to Expat</a></li>
<a href="">XML Tools
2</a> is an AppleScript scripting addition that allows AppleScript
applications to work with XML data; it is based on Expat.</li>
<a href="">Simkin</a> is an open source
scripting language available under the GNU LGPL. It can be embedded
in XML and supports a DOM-like API backed by Expat.</li>
<a href="">EasySoap</a> is a C++
SOAP implementation which uses Expat.</li>
<a href=
>A discussion</a> of another way to manage stateful callbacks, using
Expat as a sample library.</li>
The <a href="">GOBO
project</a> is working on an Eiffel binding for Expat. Development
is active and the package is fully supported in GOBO 3.0 and 3.1,
though there isn't much status information about the Expat bindings
on the website. (Most activity is reportedly on the relevant
mailing lists.)</li>
<a href="">Expat4D</a> is a plug-in
for the <a href="">4th Dimension</a> application
<td class="corner">
<a href="">
<img src=";type=2"
width="125" height="37" border="0" alt=" Logo" />