How to convert xml into array in php?
Although this is not related to Drupal but anyway you must convert from XML to array by using the sample code below from PHP.net

$simple = "&lt;para&gt;&lt;note&gt;simple note&lt;/note&gt;&lt;/para&gt;";
$p = xml_parser_create();
xml_parse_into_struct($p, $simple, $vals, $index);
xml_parser_free($p);
echo "Index array\n";
print_r($index);
echo "\nVals array\n";
print_r($vals);


Ref: xml_parse_into_struct — Parse XML data into an array structure