After doing this change the root to the child elementwhich u want to traverse now.You can do this by going root.getChild(i) fununctiongiving the i as the number of the child