I send a GET request with PHP curl and get an XML file as response.
$curl_session = curl_init();
curl_setopt($curl_session, CURLOPT_URL, $url);
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl_session, CURLOPT_HTTPHEADER, array(
'Content-Type: application/xml',
'Accept-Encoding: gzip, deflate, br'
));
$result = curl_exec($curl_session );
curl_close($curl_session);
Unfortunately PHP returns me a string.
19520110PkwLimousineAudiRS3MetallicAllradantriebSchiebedachLeichtmetallfelgenZentralverriegelungElektr. FensterheberElektr. WegfahrsperreServolenkungABSESPNavigationssystemScheckheftgepflegtTempomatSitzheizungGarantieRegensensor
If I save the response directly in an XML file, then it works. However, I would like to work with the XML data without having to save it first. simplexml_load_string does not work, because the XML tag is missing in the string. How can I work directly with the XML data?