[XML-SIG] Re: FREE DOM
Andrew M. Kuchling
akuchlin@cnri.reston.va.us
Wed, 9 Sep 1998 10:03:06 -0400 (EDT)
Ken MacLeod writes:
>When you build the tree, don't include parent references. But when
>somebody asks for a tree object, return a proxy for the tree object
>that includes a parent reference. Create iterator methods in the
>proxy object that return new proxies with a correct parent
>proxy-iterator.
That seems like a reasonable strategy, but how do you
determine what the parent reference should be, in general? It's
obviously trivial to construct a proxy for some special cases, such as
the children of a node, but how would you find the parent of a node
without actually storing a reference to it? Storing a non-reference,
such as an integer ID? Walking the tree? Something else?
--
A.M. Kuchling http://starship.skyport.net/crew/amk/
First, you must know what the thing is, and then after learn the use of the
same.
-- Robert Recorde