for this job, you must use a recursive function (a function that call's itself, testing if all nodes in this node has been processed, and if it has subnodes, process again...
I hope this help you.
Ps: If needed, i'll provide to you the code ( i must search it), but it is a good programming exercise.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.