generating XML file that represents a directory structure