Added the ability to switch between normal and XML output