XML Expat parsing for the Lua programming language


LuaExpat is a SAX XML parser based on the Expat library.

LuaExpat is free software and uses the same license as Lua 5.1.


Current version is 1.3.0. It was developed for both Lua 5.1 and Lua 5.2, and has been tested on Linux, Windows (XP) and MacOS X with Expat 2.1.0.


The latest LuaExpat release is 1.3.0.

Older LuaExpat releases can be downloaded from LuaForge page.

Binaries for Windows are bundled with the Lua for Windows project.

LuaExpat is also available from the main LuaRocks repository, as 'luaexpat'.


Version 1.3.0 [02/Apr/2014]
  • Lua 5.2 support (thanks Tom├ís Guisasola Gorham)
  • support for the XmlDecl handler
  • add parser:getcurrentbytecount() (XML_GetCurrentByteCount)
  • ability to disable CharacterData merging
  • Makefile improvements (thanks Vadim Misbakh-Soloviov)
Version 1.2.0 [02/Jun/2011]
New maintainer: Matthew Wild
  • support for the StartDoctypeDecl handler
  • add parser:stop() to abort parsing inside a callback
Version 1.1.0 [05/Jun/2007]
  • adapted to work on both Lua 5.0 and Lua 5.1
  • updated to use Expat 2.0.0
Version 1.0.2 [23/Mar/2006]
  • minor bugfix, lom correct module name is lxp.lom
Version 1.0.1 [06/Jun/2005]
  • minor changes for compatibility with Expat version 1.95.8
Version 1.0 [2/Dec/2004]
Version 1.0 Beta [4/Apr/2004]
Version 1.0 Alpha [10/Dec/2003]


LuaExpat uses the Expat library. For details on the C API please refer to the article "Using Expat".

LuaExpat implements the SAX API.


Version 1.0 was designed by Roberto Ierusalimschy, André Carregal and Tomás Guisasola as part of the Kepler Project which holds its copyright. The implementation was coded by Roberto Ierusalimschy, based on a previous design by Jay Carlson.

LuaExpat development was sponsored by Fábrica Digital and FINEP.


For more information please contact us. Comments are welcome!

You can also reach other Kepler developers and users on the Kepler Project mailing list.