allow generating xml without writing to file