$Id: README.html,v 1.1 2004/07/12 00:32:58 balls Exp $
Revision History | |
---|---|
Revision 3.0 |
This package provides a DOM binding for Tcl. It provides one of the following implementations:
A Tcl-only implementation (slow, but no compilation required),
A C-based implementation based on TclDOMPro (fast),
A wrapper for the Gnome libxml2 library (also fast and compatiable with TclXSLT/libxslt).
See the TclXML website for more information on XML support for Tcl.
Contact Steve Ball for information about this release.
How you install the package depends on which implementation you require.
All in cases, the following packages must be installed before attempting to install TclDOM.
http://dev.scriptics.com/software/tcllib/
In order for the Tcl-only parser to resolve external entities, the tcllib package must be installed.
Be sure to get a version which includes the uri package. Version 1.2 or better is recommended.
The latest CVS snapshot may be found at the SourceForge project page.
First install TclXML version 3.0.
The install.tcl script will install the pure-Tcl DOM implementation. Run it using wish, eg.
wish install.tcl
If the pure-Tcl parser is good enough for you, then read no further.
If you need the performance of a compiled DOM implementation, then you have three options:
TclDOM/libxml2
TclDOM/C (a.k.a. TclDOMPro)
tDOM (different API to TclDOM, but similar functionality)
In order to build TclDOM/libxml2, first install the TclXML package with libxml2 support - ie. TclXML/libxml2.
You must have Tcl/Tk version 8.2 or better installed on your system. Tcl/Tk 8.3 or better is recommended.
Unpack the TclDOM distribution and cd into the tcldom-3.0/src-libxml2 directory.
Run the configure script, with the [--prefix] and [--enable-threads] switches (the latter only if Tcl has been built with threads enabled).
For example, on my system I have Tcl 8.4 installed in /usr/local/tcl8.4 so I would use the command:
./configure --prefix=/usr/local/tcl8.4 --enable-threads --with-libxml2-include=/usr/local/include --with-libxml2-lib=/usr/local/lib
make
make install
You may have to do this as root
You must have Tcl/Tk version 8.2 or better installed on your system. Tcl/Tk 8.3 or better is recommended.
You must have TclXML/libxml2 installed, so you will have already downloaded and unpacked the libxml2 distribution.
If you have a TEA build environment, just use the normal configure/make/make install pattern.
Alternatively, the win subdirectory contains a makefile.vc file for Visual Studio C++ v6.0. This makefile builds the TclDOM/libxml2 implementation. In a Command Prompt window set up your environment so that nmake is on the path (by running VCVARS32.BAT), then type the following:
nmake -f makefile.vc TCLDIR=C:\Path\To\Tcl INSTALLDIR=C:\Path\To\Tcl LIBZDIR=C:\Path\To\libz LIBICONVDIR=C:\Path\To\libiconv LIBXML2DIR=C:\Path\To\libxml2 TCLXMLDIR=..\tclxml
As an example, on my system I have Tcl installed in C:\Tcl and the libxml2 binaries unpacked in the directory C:\gnome. The TCLXMLDIR variable defaults to ..\tclxml. Accordingly, I would use the following command line:
nmake -f makefile.vc TCLDIR=C:\Tcl INSTALLDIR=C:\Tcl LIBZDIR=C:\gnome\zlib-1.1.4.win32 LIBICONVDIR=C:\gnome\libiconv-1.9.1.win32 LIBXML2DIR=C:\gnome\libxml2-2.6.7.win32
Install the package by appending 'install' to the command line used above, for example:
nmake -f makefile.vc TCLDIR=C:\Path\To\Tcl INSTALLDIR=C:\Path\To\Tcl LIBZDIR=C:\Path\To\libz LIBICONVDIR=C:\Path\To\libiconv LIBXML2DIR=C:\Path\To\libxml2 TCLXMLDIR=..\tclxml install