• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..01-Dec-201110

amiga/H01-Dec-201110

bcb5/H01-Dec-201129

ChangesH A D29-Nov-20119 KiB

configureH A D29-Nov-2011698.5 KiB

configure.inH A D29-Nov-20114.5 KiB

conftools/H01-Dec-201112

COPYINGH A D29-Nov-20111.2 KiB

doc/H01-Dec-20118

examples/H01-Dec-20116

expat.dswH A D29-Nov-20111.9 KiB

expat_config.h.inH A D29-Nov-20112.4 KiB

lib/H01-Dec-201129

Makefile.inH A D29-Nov-20115.9 KiB

MANIFESTH A D29-Nov-20112.2 KiB

READMEH A D29-Nov-20115.6 KiB

tests/H01-Dec-201111

vms/H01-Dec-20115

win32/H01-Dec-20115

xmlwf/H01-Dec-201118

README

1
2                        Expat, Release 2.0.1
3
4This is Expat, a C library for parsing XML, written by James Clark.
5Expat is a stream-oriented XML parser.  This means that you register
6handlers with the parser before starting the parse.  These handlers
7are called when the parser discovers the associated structures in the
8document being parsed.  A start tag is an example of the kind of
9structures for which you may register handlers.
10
11Windows users should use the expat_win32bin package, which includes
12both precompiled libraries and executables, and source code for
13developers.
14
15Expat is free software.  You may copy, distribute, and modify it under
16the terms of the License contained in the file COPYING distributed
17with this package.  This license is the same as the MIT/X Consortium
18license.
19
20Versions of Expat that have an odd minor version (the middle number in
21the release above), are development releases and should be considered
22as beta software.  Releases with even minor version numbers are
23intended to be production grade software.
24
25If you are building Expat from a check-out from the CVS repository,
26you need to run a script that generates the configure script using the
27GNU autoconf and libtool tools.  To do this, you need to have
28autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred).
29Run the script like this:
30
31        ./buildconf.sh
32
33Once this has been done, follow the same instructions as for building
34from a source distribution.
35
36To build Expat from a source distribution, you first run the
37configuration shell script in the top level distribution directory:
38
39        ./configure
40
41There are many options which you may provide to configure (which you
42can discover by running configure with the --help option).  But the
43one of most interest is the one that sets the installation directory.
44By default, the configure script will set things up to install
45libexpat into /usr/local/lib, expat.h into /usr/local/include, and
46xmlwf into /usr/local/bin.  If, for example, you'd prefer to install
47into /home/me/mystuff/lib, /home/me/mystuff/include, and
48/home/me/mystuff/bin, you can tell configure about that with:
49
50        ./configure --prefix=/home/me/mystuff
51        
52Another interesting option is to enable 64-bit integer support for
53line and column numbers and the over-all byte index:
54
55        ./configure CPPFLAGS=-DXML_LARGE_SIZE
56        
57However, such a modification would be a breaking change to the ABI
58and is therefore not recommended for general use - e.g. as part of
59a Linux distribution - but rather for builds with special requirements.
60
61After running the configure script, the "make" command will build
62things and "make install" will install things into their proper
63location.  Have a look at the "Makefile" to learn about additional
64"make" options.  Note that you need to have write permission into
65the directories into which things will be installed.
66
67If you are interested in building Expat to provide document
68information in UTF-16 rather than the default UTF-8, follow these
69instructions (after having run "make distclean"):
70
71        1. For UTF-16 output as unsigned short (and version/error
72           strings as char), run:
73
74               ./configure CPPFLAGS=-DXML_UNICODE
75
76           For UTF-16 output as wchar_t (incl. version/error strings),
77           run:
78
79               ./configure CFLAGS="-g -O2 -fshort-wchar" \
80                           CPPFLAGS=-DXML_UNICODE_WCHAR_T
81
82        2. Edit the MakeFile, changing:
83
84               LIBRARY = libexpat.la
85
86           to:
87
88               LIBRARY = libexpatw.la
89
90           (Note the additional "w" in the library name.)
91
92        3. Run "make buildlib" (which builds the library only).
93           Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
94
95        4. Run "make installlib" (which installs the library only).
96           Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
97           
98Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
99value for DESTDIR, and the rest of the make file using only DESTDIR.
100It works as follows:
101   $ make install DESTDIR=/path/to/image
102overrides the in-makefile set DESTDIR, while both
103   $ INSTALL_ROOT=/path/to/image make install
104   $ make install INSTALL_ROOT=/path/to/image
105use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
106environment, because variable-setting priority is
1071) commandline
1082) in-makefile
1093) environment           
110
111Note for Solaris users:  The "ar" command is usually located in
112"/usr/ccs/bin", which is not in the default PATH.  You will need to
113add this to your path for the "make" command, and probably also switch
114to GNU make (the "make" found in /usr/ccs/bin does not seem to work
115properly -- appearantly it does not understand .PHONY directives).  If
116you're using ksh or bash, use this command to build:
117
118        PATH=/usr/ccs/bin:$PATH make
119
120When using Expat with a project using autoconf for configuration, you
121can use the probing macro in conftools/expat.m4 to determine how to
122include Expat.  See the comments at the top of that file for more
123information.
124
125A reference manual is available in the file doc/reference.html in this
126distribution.
127
128The homepage for this project is http://www.libexpat.org/.  There
129are links there to connect you to the bug reports page.  If you need
130to report a bug when you don't have access to a browser, you may also
131send a bug report by email to expat-bugs@mail.libexpat.org.
132
133Discussion related to the direction of future expat development takes
134place on expat-discuss@mail.libexpat.org.  Archives of this list and
135other Expat-related lists may be found at:
136
137        http://mail.libexpat.org/mailman/listinfo/
138