2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
Expat, Release 1.95.4
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-12 01:21:23 -04:00
|
|
|
This is Expat, a C library for parsing XML, written by James Clark.
|
2001-07-27 16:34:52 -04:00
|
|
|
Expat is a stream-oriented XML parser. This means that you register
|
|
|
|
handlers with the parser before starting the parse. These handlers
|
2001-07-24 13:08:58 -04:00
|
|
|
are called when the parser discovers the associated structures in the
|
|
|
|
document being parsed. A start tag is an example of the kind of
|
|
|
|
structures for which you may register handlers.
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2001-07-27 16:34:52 -04:00
|
|
|
Windows users should use the expat_win32bin package, which includes
|
|
|
|
both precompiled libraries and executalbes, and source code for
|
|
|
|
developers.
|
|
|
|
|
2001-07-24 13:08:58 -04:00
|
|
|
Expat is free software. You may copy, distribute, and modify it under
|
2001-07-27 16:34:52 -04:00
|
|
|
the terms of the License contained in the file COPYING distributed
|
2001-07-24 13:08:58 -04:00
|
|
|
with this package. This license is the same as the MIT/X Consortium
|
|
|
|
license.
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-12 01:21:23 -04:00
|
|
|
Versions of Expat that have an odd minor version (the middle number in
|
2001-07-24 13:08:58 -04:00
|
|
|
the release above), are development releases and should be considered
|
|
|
|
as beta software. Releases with even minor version numbers are
|
|
|
|
intended to be production grade software.
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-12 01:21:23 -04:00
|
|
|
To build Expat, you first run the configuration shell script in the
|
2001-07-24 13:08:58 -04:00
|
|
|
top level distribution directory:
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
./configure
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2001-07-24 13:08:58 -04:00
|
|
|
There are many options which you may provide to configure (which you
|
|
|
|
can discover by running configure with the --help option). But the
|
|
|
|
one of most interest is the one that sets the installation directory.
|
|
|
|
By default, the configure script will set things up to install
|
2001-07-27 16:34:52 -04:00
|
|
|
libexpat into /usr/local/lib, expat.h into /usr/local/include, and
|
|
|
|
xmlwf into /usr/local/bin. If, for example, you'd prefer to install
|
|
|
|
into /home/me/mystuff/lib, /home/me/mystuff/include, and
|
|
|
|
/home/me/mystuff/bin, you can tell configure about that with:
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
./configure --prefix=/home/me/mystuff
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2001-07-24 13:08:58 -04:00
|
|
|
After running the configure script, the "make" command will build
|
|
|
|
things and "make install" will install things into their proper
|
|
|
|
location. Note that you need to have write permission into the
|
|
|
|
directories into which things will be installed.
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2002-06-03 14:46:36 -04:00
|
|
|
If you are interested in building Expat to provide document
|
|
|
|
information in UTF-16 rather than the default UTF-8, following these
|
|
|
|
instructions:
|
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
1. For UTF-16 output as unsigned short (and version/error
|
|
|
|
strings as char), run:
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
./configure CPPFLAGS=-DXML_UNICODE
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
For UTF-16 output as wchar_t (incl. version/error strings),
|
|
|
|
run:
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
./configure CFLAGS="-g -O2 -fshort-wchar" \
|
|
|
|
CPPFLAGS=-DXML_UNICODE_WCHAR_T
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
2. Edit the MakeFile, changing:
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
LIBRARY = libexpat.la
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
to:
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
LIBRARY = libexpatw.la
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
(Note the additional "w" in the library name.)
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
3. Run "make buildlib" (which builds the library only).
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
4. Run "make installlib" (which installs the library only).
|
2002-06-03 14:46:36 -04:00
|
|
|
|
2001-01-25 12:55:24 -05:00
|
|
|
Note for Solaris users: The "ar" command is usually located in
|
|
|
|
"/usr/ccs/bin", which is not in the default PATH. You will need to
|
2001-07-25 13:16:03 -04:00
|
|
|
add this to your path for the "make" command, and probably also switch
|
|
|
|
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
|
2001-07-25 14:08:05 -04:00
|
|
|
properly -- appearantly it does not understand .PHONY directives). If
|
|
|
|
you're using ksh or bash, use this command to build:
|
2001-01-25 12:55:24 -05:00
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
PATH=/usr/ccs/bin:$PATH make
|
2001-01-25 12:55:24 -05:00
|
|
|
|
2001-11-08 23:57:33 -05:00
|
|
|
When using Expat with a project using autoconf for configuration, you
|
|
|
|
can use the probing macro in conftools/expat.m4 to determine how to
|
|
|
|
include Expat. See the comments at the top of that file for more
|
|
|
|
information.
|
|
|
|
|
2001-07-24 13:08:58 -04:00
|
|
|
A reference manual is available in the file doc/reference.html in this
|
2000-09-29 11:44:00 -04:00
|
|
|
distribution.
|
|
|
|
|
2002-06-04 12:35:21 -04:00
|
|
|
The homepage for this project is http://www.libexpat.org/. There
|
2001-07-24 13:08:58 -04:00
|
|
|
are links there to connect you to the bug reports page. If you need
|
|
|
|
to report a bug when you don't have access to a browser, you may also
|
|
|
|
send a bug report by email to expat-bugs@lists.sourceforge.net.
|
2000-09-29 11:44:00 -04:00
|
|
|
|
2001-07-24 13:08:58 -04:00
|
|
|
Discussion related to the direction of future expat development takes
|
|
|
|
place on expat-discuss@lists.sourceforge.net. Archives of this list
|
2002-05-31 00:00:59 -04:00
|
|
|
may be found at:
|
|
|
|
|
2002-07-09 16:49:47 -04:00
|
|
|
http://sourceforge.net/mailarchive/forum.php?forum_id=6385
|