[XML-SIG] Need an equivalent to Perl's XML::Parser "Tree" style

Lars Marius Garshol larsga@garshol.priv.no
07 Jun 2000 10:05:41 +0200

* John Posner
| QUESTION: what set of Python tools comes closest to creating a data
| structure similar to, or exactly like, the above?

Probably demo/xmlproc/doctree.py in the XML-SIG package. The structure
there is a three-tuple for every element (name, att dict, child list),
which PCDATA appearing as strings. 

It was just written as a demo and never used for anything by me (and
is also xmlproc-specific), but it's exactly what you asked for.
Rewriting it for SAX or pyexpat should take all of 30 minutes. :)

--Lars M.