[XML-SIG] parsing xml schema

Martin v. Loewis martin@v.loewis.de
Fri, 23 Nov 2001 19:12:28 +0100


> However, I may yet go for option 2, if the overhead of parsing my
> data files (which will alll be < 100K text) turns out to be large.

There is another option: parse the document only once using
expat. More precisely, register a set of handlers with expat that
feeds both the trex parsing, and a DOM builder
(i.e. xml.dom.ext.readers.PyExpat); alternatively, feed both pytrex
and expatreader, and use the resulting SAX events to build a DOM tree.

HTH,
Martin