Huge input lookup error on simplexml_load_string function

自闭症网瘾萝莉.ら 提交于 2020-01-24 19:01:24

问题


I have an API response where sizes vary. It doesn't show error on large xml data(appx. 20MB), when I try to convert the xml object into std object using. This is my code

$xml = simplexml_load_string($apiResponse);
$object = json_decode(json_encode($xml));

Error Message is:

simplexml_load_string(): Entity: line 1: parser error : internal error: Huge input lookup

I google and found this answer on stackoverflow and changed my code to

simplexml_load_string($apiResponse, 'SimpleXMLElement', LIBXML_PARSEHUGE)

But, error is still same. Anyone has got any Idea? Thank you in advance

来源:https://stackoverflow.com/questions/42467791/huge-input-lookup-error-on-simplexml-load-string-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!