Created a generic function that loops through the dictionary and cmlmap to print out xml