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

前端 未结 5 1924
感动是毒
感动是毒 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:19

    Use replace CDATA before parsing PHP DOM element after that you can get the innerXml or innerHtml:

    str_replace(array('<\![CDATA[',']]>'), '', $xml);
    

提交回复
热议问题