Re: [phplib] PHP and recursion From: Klaus Seidenfaden (ks <email protected>)
Date: 05/31/01

-----Oprindelig meddelelse-----
Fra: Roy Huggins <roy <email protected>>

>
>I recently built a pair of classes whose purpose is to create a tree of TreeNode
>objects in which each node has one parent, many children and an array of
>arbitrary data. Performing operations on these trees uses a lot of recursion, of
>course.

Yes. I did something similar (for the first time in PHP) a few days ago. No memory problems, but then again, the data set was rather small and shallow. The solution makes extensive use of references. I still wonder how I got it to work - now I can hardly read the code :-)

The purpose: To parse an xml file into a tree structure that could be used to drive the parsing of a template. The tree stuff worked, but I found the template class too inflexible to cope with variations in the xml structure :-(

Is there an XSLT processor module out there in PHP-land?

-- Klaus.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>