corrected errors in template
converted xml to json