added XMLtoJSON function to WSUAPI