JSON working, xml almost working