Apple Interview Question

Write a program to go through a DOM tree