php解析xml

$resp['resp'] = '

    000000
    ??
    registNotify
    19
    15389779989282
';
libxml_disable_entity_loader(true);
$xml_resp = simplexml_load_string($resp['resp'], 'SimpleXMLElement', LIBXML_NOCDATA);
print_r($xml_resp);
$xml_ary = json_decode(json_encode($xml_resp), true);
print_r($xml_ary);

 

你可能感兴趣的:(php基础)