Added code to regenerate xml from the resultant json