Tree of checkboxes

Hello, i’m new to webmethods. I have one xml- file. My webapplication reads this file with NodeTreeContentProvider and presents the structure of this xml file as a tree of checkboxes: one checkbox for every node of the xml file. I have two questions: how can i make, that if one checkbox is selected then all child- checkboxes will be also selected.
The second question: how can I create/read the tree, which contains only the nodes, whose checkboxes are selected.
Thank you for your reply. I really need an advice. And sorry for my english.