dynamic naming for hierarchical problem

Peter Hansen peter at engcorp.com
Wed Aug 8 20:22:58 EDT 2001


Jeremy Jones wrote:
> 
> I want to be able to dynamically build a hierarchical
> set of data.  [...]  By hierarchical,
> I mean that there will be parent-child relationships
> and that the parents and children should be aware of
> one another in their respective relationships (i.e.
> the parent should be aware of its children and
> children should be aware of their parents).  By
> dynamic, I mean that the names in the set of data will
> very likely be extracted from a text file or entered
> in by a user at run time.  I also mean that the number
> of levels in the hierarchy will potentially be
> variable and will be defined at run time.  
[...]

I don't think I got a clear enough idea from your 
posting to know what it is you really want (i.e. 
you could describe what *purpose* you have in mind, 
rather than describing a set of features you think
you need).

Nevertheless, a lot of what you refer to above
seems to be provided by the Document Object Model
(DOM) concept available effectively universally
for in-memory manipulation of XML data.  Since
XML (at least in a DOM) seems to provide the 
basic features you describe above, maybe it could
in some way help you...  ??

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list