How to get values inside <![CDATA[values]] > using php DOM?

前端 未结 5 1925
感动是毒
感动是毒 2020-12-01 06:36

How can i get values inside using php DOM. This is few code from my xml.

     

        
          


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 07:04

    I use following code. Its not only read all xml data with

     
    

    but also convert xml object to php associative array. So we can apply loop on the data.

    $xml_file_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA),true), true);
    

    Hope this will work for you.

提交回复
热议问题