I'm trying to convert this specific XML file to PHP Array
http://www.crcind.com/csp/samples/SOAP.Demo.cls?soap_method=QueryByName&name=John
The part I want to get is
<QueryByName diffgr:id="QueryByName1"msdata:rowOrder="0"><ID>174</ID><Name>Johnson,Brian T.</Name><DOB>1934-11-09</DOB><SSN>751-82-3888</SSN></QueryByName>
I tried to use soapResponseToJson(xml) And
$xmlfile = file_get_contents($path);
//convert xml string into an object
$xml = simplexml_load_string($xmlfile);
//convert into json
$json = json_encode($xml);
//convert into associative array
$xmlArr = json_decode($json, true);
But keeps not working.
Can you help me please?
Kind regards.