php xml转数组

function xml_to_array($Obj){
    $result= (array)simplexml_load_string($Obj,'SimpleXMLElement', LIBXML_NOCDATA); 
    return $result;
}
原文地址:https://www.cnblogs.com/chengfengchi/p/12619256.html