Fixed XMLUtil error handling.