iterate dom tree