javascript which reads xml file tree