xml转json

    $html = file_get_contents('http://',FALSE,$context);
    $json2 = json_decode(json_encode(simplexml_load_string($html, 'SimpleXMLElement', LIBXML_NOCDATA)), true);

就这么简单

posted @ 2021-05-17 14:37  ggsmdaa  阅读(75)  评论(0编辑  收藏  举报