Kender is right; I didn't get that from your explanation, but if your data is structured like a tree, recursion simplifies things a lot. Anything you can do with recursion you can do with iterative loops, but the former really shines when parsing tree like data and using loops in this case is difficult and makes the code hard to follow.