convert a xml doc into a json doc