XMLOutput logic altered