generating XML file that represents a directory structure for Nodejs