I'm trying to parse a GuzzleHTTP\PSR7\Response
into a SimpleXMLElement
Object using simplexml_load_string()
function. What I'm facing here is I get Randomly Exception that says :
Entity: line 1: parser error : Start tag expected, '<' not found
and by randomly I mean once I pass successfully, once fail.
What is your suggestion for simplexml_load_string()
input/ How to fix the Exception?
PHP :
$xml = simplexml_load_string((string)$response->getBody());