For the search part, are you able to do a recursive function that searches the entire tree? It could start at the top, loop through each of the children while calling itself to be performed on each of the children, returning true when the name is found, or false if all of the children have been checked through the loop. Something like:
Code:
bool findName(node)
{
if nodename=searchname return true
else
for (x=1; x<(# of children); x++) {
if (findName(child[x])) return true
return false
}
Just pseudocode and needs a few more details like reporting back WHERE the name was found, but you should get the idea.