Working code to view directory tree from working xml tree