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 introductory article on using Expat is available on
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
- 5 June 2007,
Expat 2.0.1 released.
Release 2.0.1 of the Expat XML parser is a bugfix release
resolving both code and build related issues. Changes include:
- 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.
- Fixed: Expat failed on EBCDIC systems as it assumed some character
constants to be ASCII encoded.
- Minor cleanups of the test harness.
- Minor fixes for xmlwf and example programs.
- Fixes and improvements for the Windows platform.
New Windows directory structure.
- Build fixes for various platforms: HP-UX, Tru64, Solaris 9.
- Build fixes for Unix:
- Refreshed config.sub/config.guess.
- Support both, DESTDIR and INSTALL_ROOT, without relying on GNU-Make specific features.
- Patched configure.in to work better with Intel compiler.
- Fixes to Makefile.in to have make check work correctly.
- Added Open Watcom support.
- 11 January 2006,
Expat 2.0.0 released.
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:
- Fixed headers for use from C++.
- XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
now return unsigned integers.
- Added XML_LARGE_SIZE switch to enable 64-bit integers for
byte indexes and line/column numbers.
- Added support for AmigaOS.
- Some mostly minor bug fixes. SF issues include: 1006708,
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
Old news archive
References & 3rd-party Wrappers
If you know of any additional articles or resources which should be
linked to from this page, please send email to Fred Drake (email@example.com).
We're especially interested in links to tutorial information and open
source interfaces to Expat from languages other than C.
James Clark's original Expat page, for Expat 1.2 and
Introductory article on using Expat on
LuaExpat is a
wrapper around Expat for the Lua
programming language. The LuaSOAP library is a SOAP implementation
built on top of LuaExpat.
XML::Parser module is a wrapper built around a
binding to Expat in the
Documentation for the Python interface to Expat, part of the
standard documentation for Python.
SAXExpat.NET, a .NET
wrapper for Expat, conforming to the
SAX for .NET specifications.
The Simple C Expat Wrapper
is a wrapper around Expat that provides a light-weight object model
somewhat like a DOM.
for the Expat XML Parser, an article by Tim Smith
providing object-oriented wrappers for Expat. The wrappers use
some MFC-biased naming, but look interesting.
Arabica -- an XML Parser toolkit for C++ programmers, with
SAX2 implementations based on several parsers, including Expat.
ExpatMM -- C++ interface to Expat
SAX2 Wrapper for using Expat in Delphi,
"SAX for Pascal"
The TclXML project includes a Tcl binding for Expat
tDOM is an alternate package providing XML support for Tcl, based in part on
Article on using Expat from PHP on
(broken into lots of tiny pieces)
Objective-C interface to Expat
OCaml Expat is a
wrapper around Expat for the Objective Caml language.
Ruby interface to Expat
2 is an AppleScript scripting addition that allows AppleScript
applications to work with XML data; it is based on Expat.
Simkin 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.
EasySoap is a C++
SOAP implementation which uses Expat.
A discussion of another way to manage stateful callbacks, using
Expat as a sample library.
project 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
Expat4D is a plug-in
for the 4th Dimension application