Added an xml reader function.