Pushing and Popping document handlers
Thomas Gagne
tgagne at ix.netcom.com
Tue Aug 15 16:02:54 EDT 2000
I should probably wait to ask this question until I finishe reading McGrath's
"XML Processing with Python", but I was wondering...
.. I create a document handler for a file to handle batches of POs. Inside
the startElement() methods there's a bunch of if name == "yadayada" sections
that appear as though I'm working too hard. I was wondering there was a way
to switch document handlers based on the tag coming in?
For instance, I'd like to have one handler for PO header information and a
separate one for each of the lines on a PO.
My code is already working (as far as I can tell) but I think it would be
easier if I were able to have separate document handlers.
More information about the Python-list
mailing list