Hi Phongthorn,
Thanks for reaching out. By looking into the code you mentioned I observed that there is actually a JSON object and then it was decoded and saved in a file.
$json = json_encode( simplexml_load_string($reportDownloadResult->getAsString()));
$resultTable = json_decode($json, true)['table'];
You would be able to use this JSON data before it was converted.
Thanks and regards,
Xiaoming, Google Ads API Team