How to load XML when PHP can't indicate the right encoding?

前端 未结 4 1610
梦谈多话
梦谈多话 2020-12-12 00:08

I\'m trying to load an XML source from a remote location, so i have no control of the formatting. Unfortunately the XML file I\'m trying to load has no encoding:

<         


        
4条回答
  •  死守一世寂寞
    2020-12-12 00:43

    You can try using the XMLReader class instead. The XMLReader is designed specifically for XML and has options for what encoding to use (including 'null' for none).

提交回复
热议问题