[XML-SIG] RE: DOM circular refs

Jeff.Johnson@stn.siemens.com Jeff.Johnson@stn.siemens.com
Fri, 9 Oct 1998 14:55:54 -0400


Looks like I didn't solve all the problems.  Using SaxBuilder to read an
XML file, 3 Nodes never get freed and none of the _nodeDatas get freed!
I've noticed in the past that if I don't set the DocumentHandler.document
to None when finished, it doesn't free, maybe this is a bug somewhere in
the builder code.  I'll try to find it, one more day won't slip my project
too much :)

Being a Python newbie, I didn't know about __getattr__ and __setattr__ ten
minutes ago.  Maybe mucking with those would be a good way of providing a
readonly documentElement attribute for Document that raises an exception
when set and returns a new proxy when got.  Currently I got rid of the
attribute in favor of a function call get_documentElement().  What do the
python gurus say?

Cheers,
Jeff