Converting XML to JSON by using PHP as script