
This package contains tools that assist in developing Python
modules that process the XML output from SWIG (generated with the
"-xml" SWIG option).  In particular, generateDS.py and the XML Schema
document in this package (swigxml15.xsd) generate Python classes
that represent the elements in the XML documents generated by SWIG
1.3 along with code that builds instances of these classes from an
XML document.  You can add your own code to process this content.

Steps for using generateDS.py to produce and use Python files that
process the output from SWIG 1.3

1. Generate the Python files with run_generate (which runs
    generateDS.py):

        ./run_generate

    Or, something like:

        ./generateDS.py -o testsuper.py -s testsub.py swigxml15.xsd

    Generate new subclasses with:

        ./generateDS.py -s testsub.py swigxml15.xsd

2. Generate the XML description of an interface with something like
the following:

        swig -xml -c++ -importall test1.i

3. Test the Python superclass file by using the generated file to
    read and write out the contents of the XML output from SWIG. 
    For example:

        python testsuper.py test1.xml

4. Add your application-specific code to the subclasses in the
    Python subclass file.  Also, there are several other edits that
    you will need to make.  Search for "???".

5. Run your application-specific code by executing the Python
    subclass file.  For example:

        python testsub.py test1.xml

And, some additional notes:

There is a bit of documentation on generateDS.py and the files it
generates at:

        http://www.rexx.com/~dkuhlman/#generateDS

The included version of generateDS.py is slightly modified version
of what is at this Web site.

You will need minidom in order to run this.  minidom is part of the
Python 2.2.1 distribution, I believe.  But I've installed PyXML on
my machine, so I've never tried the stuff included with Python. 
Therefore, you may have to install PyXML in order to use
generateDS.py and the files it generates.  PyXML is available at:

    http://pyxml.sourceforge.net/
    http://www.python.org/sigs/xml-sig/.

My testing has been done with SWIG version 1.3.15.


Dave Kuhlman
dkuhlman@rexx.com
http://www.rexx.com/~dkuhlman

