PrestaShopWebservice::parseXML PHP Метод

parseXML() защищенный Метод

Load XML from string. Can throw exception
protected parseXML ( string $response ) : SimpleXMLElement
$response string String from a CURL response
Результат SimpleXMLElement status_code, response
    protected function parseXML($response)
    {
        if ($response != '') {
            libxml_clear_errors();
            libxml_use_internal_errors(true);
            $xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA);
            if (libxml_get_errors()) {
                $msg = var_export(libxml_get_errors(), true);
                libxml_clear_errors();
                throw new PrestaShopWebserviceException('HTTP XML response is not parsable: ' . $msg);
            }
            return $xml;
        } else {
            throw new PrestaShopWebserviceException('HTTP response is empty');
        }
    }