Changes trying to improve performance of xml parsing