Moved all xml parsing code to json.