2000-09-29 11:44:00 -04:00
|
|
|
|
2016-06-17 17:52:19 -04:00
|
|
|
Expat, Release 2.2.0
|
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
|
2006-01-01 13:53:44 -05:00
|
|
|
both precompiled libraries and executables, and source code for
|
2001-07-27 16:34:52 -04:00
|
|
|
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-08-29 12:46:59 -04:00
|
|
|
If you are building Expat from a check-out from the CVS repository,
|
|
|
|
you need to run a script that generates the configure script using the
|
|
|
|
GNU autoconf and libtool tools. To do this, you need to have
|
2012-03-03 17:02:09 -05:00
|
|
|
autoconf 2.58 or newer. Run the script like this:
|
2002-08-29 12:46:59 -04:00
|
|
|
|
|
|
|
./buildconf.sh
|
|
|
|
|
|
|
|
Once this has been done, follow the same instructions as for building
|
|
|
|
from a source distribution.
|
|
|
|
|
|
|
|
To build Expat from a source distribution, you first run the
|
|
|
|
configuration shell script in the 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
|
2005-12-28 13:41:57 -05:00
|
|
|
|
|
|
|
Another interesting option is to enable 64-bit integer support for
|
2006-01-01 13:53:44 -05:00
|
|
|
line and column numbers and the over-all byte index:
|
2005-12-28 13:41:57 -05:00
|
|
|
|
|
|
|
./configure CPPFLAGS=-DXML_LARGE_SIZE
|
2006-04-07 22:52:06 -04:00
|
|
|
|
|
|
|
However, such a modification would be a breaking change to the ABI
|
|
|
|
and is therefore not recommended for general use - e.g. as part of
|
|
|
|
a Linux distribution - but rather for builds with special requirements.
|
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
|
2005-12-28 13:41:57 -05:00
|
|
|
location. Have a look at the "Makefile" to learn about additional
|
|
|
|
"make" options. 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
|
2012-03-03 17:02:09 -05:00
|
|
|
information in UTF-16 encoding rather than the default UTF-8, follow
|
|
|
|
these instructions (after having run "make distclean"):
|
2002-06-03 14:46:36 -04:00
|
|
|
|
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).
|
2006-09-22 10:47:27 -04:00
|
|
|
Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
|
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).
|
2007-05-04 23:46:28 -04:00
|
|
|
Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
|
2007-05-11 14:30:17 -04:00
|
|
|
|
|
|
|
Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
|
|
|
|
value for DESTDIR, and the rest of the make file using only DESTDIR.
|
|
|
|
It works as follows:
|
|
|
|
$ make install DESTDIR=/path/to/image
|
|
|
|
overrides the in-makefile set DESTDIR, while both
|
|
|
|
$ INSTALL_ROOT=/path/to/image make install
|
|
|
|
$ make install INSTALL_ROOT=/path/to/image
|
|
|
|
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
|
|
|
|
environment, because variable-setting priority is
|
|
|
|
1) commandline
|
|
|
|
2) in-makefile
|
2012-03-03 17:02:09 -05:00
|
|
|
3) environment
|
|
|
|
|
|
|
|
Note: This only applies to the Expat library itself, building UTF-16 versions
|
|
|
|
of xmlwf and the tests is currently not supported.
|
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
|
2016-06-06 15:15:30 -04:00
|
|
|
properly -- apparently it does not understand .PHONY directives). If
|
2001-07-25 14:08:05 -04:00
|
|
|
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
|
2002-09-04 23:34:47 -04:00
|
|
|
send a bug report by email to expat-bugs@mail.libexpat.org.
|
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
|
2002-09-04 23:34:47 -04:00
|
|
|
place on expat-discuss@mail.libexpat.org. Archives of this list and
|
|
|
|
other Expat-related lists may be found at:
|
2002-05-31 00:00:59 -04:00
|
|
|
|
2004-04-02 16:53:40 -05:00
|
|
|
http://mail.libexpat.org/mailman/listinfo/
|