expat - XML Parser Toolkit

Version 1.2

Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd. Expat is freely available with source under a very liberal license (the MIT license).

This is a production version of expat. Relative to expat 1.1, it adds support for parsing external DTDs and parameter entities. Compiling with -DXML_DTD enables this support. There's a new -p option for xmlwf which will cause it to process external DTDs and parameter entities; this implies the -x option. See the comment above XML_SetParamEntityParsing in xmlparse.h for the API addition that enables this.

Expat is an XML 1.0 parser written in C. It aims to be fully conforming. It is currently not a validating XML processor. The current production version of expat 1.X can be downloaded from ftp://ftp.jclark.com/pub/xml/expat.zip.

Development of expat 2.0 is being handled by a team led by Clark Cooper, hosted by sourceforge.net. See http://expat.sourceforge.net for the latest on expat 2.0.

The directory xmltok contains a low-level library for tokenizing XML. The interface is documented in xmltok/xmltok.h.

The directory xmlparse contains an XML parser library which is built on top of the xmltok library. The interface is documented in xmlparse/xmlparse.h. The directory sample contains a simple example program using this interface; sample/build.bat is a batch file to build the example using Visual C++.

The directory xmlwf contains the xmlwf application, which uses the xmlparse library. The arguments to xmlwf are one or more files which are each to be checked for well-formedness. An option -d dir can be specified; for each well-formed input file the corresponding canonical XML will be written to dir/f, where f is the filename (without any path) of the input file. A -x option will cause references to external general entities to be processed. A -s option will make documents that are not standalone cause an error (a document is considered standalone if either it is intrinsically standalone because it has no external subset and no references to parameter entities in the internal subset or it is declared as standalone in the XML declaration).

The bin directory contains Win32 executables. The lib directory contains Win32 import libraries.

Answers to some frequently asked questions about expat can be found in the expat FAQ.

James Clark