replaced printing function with a template, and added -bamboo as an option to generate both types of xml