i'm trying to parse data in xml with simple_load_string function in php and it's return an empty data in the $parsed (data parsed) .
the data to parse is like :
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:authenticationSuccess>
<cas:user>yassine458</cas:user>
</cas:authenticationSuccess>
</cas:serviceResponse>
is that possible to parse data with this format or there is another method to do it .
this is my code :
$xml = simplexml_load_string($result);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
$parsed= simplexml_load_string($result);
i'm trying to convert it to json format