Prints to new file and also accounts for attributes in the XMLmap