salve, ho un problema nel prendere il valore dei tag, in particolare ho una stringa xml e non riesco a leggere il valore di id_cliente.di seguito come sto facendo:
$response='<?xml version="1.0" encoding="ISO-8859-1"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:loginCustomerResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://tempuri.org"><loginCustomerReturn xsi:type="xsd:string"><?xml version="1.0"><customer_data xmlns=""><customer><id_cliente>382065<id_cliente></customer></customer_data></loginCustomerReturn></ns1:loginCustomerResponse></soapenv:Body></soapenv:Envelope>';
$xml = simplexml_load_string($response);
echo "xml=".$xml->id_cliente;
ma non stampa nulla!
grazie
$response='<?xml version="1.0" encoding="ISO-8859-1"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:loginCustomerResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://tempuri.org"><loginCustomerReturn xsi:type="xsd:string"><?xml version="1.0"><customer_data xmlns=""><customer><id_cliente>382065<id_cliente></customer></customer_data></loginCustomerReturn></ns1:loginCustomerResponse></soapenv:Body></soapenv:Envelope>';
$xml = simplexml_load_string($response);
echo "xml=".$xml->id_cliente;
ma non stampa nulla!
grazie