XML processing in Python -- changing horses in mid-stream
Tim Rowe
digitig at cix.co.uk
Sat Feb 10 09:50:00 EST 2001
I have a Python program that parses a test script written in XML and puts
the test results to stdout in XML (with a different DOCTYPE).
I also have a Python program that takes the test result XML and processes
it for graphical presentation.
Here's my challenge. If the second program were given a test script
instead of results, I would like it to recognise the different doctype,
run the tests and process the results all in one.
When my result parser spots a test script I should be able to pass the
script to the test program via a pipe, put the results of the test through
a new result parser, and copy anything relevant from the new result parser
to the old one. But can I stop the old result parser parsing the rest of
the test script?
I plan to use either expat or pyxie, whichever is easiest.
TIA.
More information about the Python-list
mailing list