1public function xmlToArray($xmlstring){
2
3 $xml = simplexml_load_string($xmlstring, "SimpleXMLElement", LIBXML_NOCDATA);
4 $json = json_encode($xml);
5 $array = json_decode($json,TRUE);
6
7 return $array;
8
9}
1$xmlfile = file_get_contents($path);
2 $ob= simplexml_load_string($xmlfile);
3 $json = json_encode($ob);
4 $configData = json_decode($json, true);
5