added function that converts raw XML to raw JSON