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 ?
Et j'obtiens le message suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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);
object(SimpleXMLElement)#3 (0) { }
Le XML que je reçois est :
<?xml version="1.0" encoding="utf-8"?>
<ClientProfile xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns
sd="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,
Partager