Change XML reader logic