[SimpleXML] Problème avec simplexml
Bonjour,
J'ai un petit souci. Voila, je récupére une chaine XML (grace a un service web) et je souhaiterai l'analyser.
Je pensais donc faire ça grace a la fonction simplexml_load_string. Cependant, cette fonction est censé me renvoyer un objet..or, il ne me renvoit rien...pourquoi ?
Code:
1 2 3 4 5 6 7 8 9 10
|
$client = new soapclient($wsdl,$options);
$test = $client->wsGetClientProfile($params);
$xml = $client->__getLastResponse();
echo "$xml";
$xml2 = simplexml_load_string($xml);
var_dump($xml2); |
Et j'obtiens le message suivant :
Citation:
object(SimpleXMLElement)#3 (0) { }
Le XML que je reçois est :
Citation:
<?xml version="1.0" encoding="utf-8"?>
<ClientProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://XXXXXX/XmlSchema ClientProfile.xsd" xmlns="http://XXXXX">
<ClientId>11111</ClientId>
<PasDejaVus>false</PasDejaVus>
<Langue>1</Langue>
<Prevenu>true</Prevenu>
<Films>true</Films>
</ClientProfile>
Merci d'avance,