This Question is Answered

15 "helpful" answers available (3 pts)
1 Replies Last post: May 7, 2008 12:17 PM by phil

How to access the child node of TreeNode ?

May 7, 2008 7:07 AM

Click to view RajivGu's profile Level 6 RajivGu 81 posts since
Apr 2, 2008

Hi,

I have a node xyz and their child node pqr,rst. I want to access the this two child node in my code .

How can I access all the child node of xyz?

Thanks

Rajiv

Click to view phil's profile Curl phil 33 posts since
Oct 17, 2007
1. Re: How to access the child node of TreeNode ? May 7, 2008 12:17 PM
A TreeNode is an iterable object, so you can write:


{define-proc {print-child-nodes node:TreeNode}:void
  {for child in node do
    {dump child}
  }
}