I'm getting this error from the sound XML has an HTML comment that I think is breaking it. There is no experience in terms of Ghazal as it is at that time when I try to get feedback on XML where this error occurs through example $ res-> XML (). $ Res alone or $ res-> getBody () does not seem to help me
"Exception exception with message" string 'can not be parsed as XML' /home/mso/public_html/connector/vendor/guzzlehttp/guzzle/src/Message/Response.php:168 Stack Trace: # 0 / Home / MSU / Public_Hailer / Connector / Seller / Guzzlehttp / guzzle / src / Message / Response.php (168): Simple Explainment -> __ Construction ('Please Use Mile ...', 2048, False, '', False) # 1 /home/mso/public_html/connector/get_dat.php (23 ): GhazleHTP \ Message \ symbol Riya-> xml () # 2 {main} Next exception 'GazleHTP \ Exceptions' XML with Exception' message 'unable to parse response body in XML: string can not be parsed as XML' / home / mso /public_html/connector/vendor/guzzlehttp/guzzle/src/Message/Response.php:174 Stack Trace: # 0 / Home /mso/public_html/connector/get_data.php (23): GuzzleHttp \ Message \ Feedback-> Xml () # 1 {main} / home / mso / public_html / connector / vendor / guzzlehttp / guzzle / src / message thrown in / response. FTP line 17p
You can try to check your XML before loading:
$ oXmlUtilities = new cXmlUtilities (); // Valid XML file by setting internal errors; Libxml_use_internal_errors (true); Try {$ sTmpString = simplexml_load_string ($ sContents); } Hold (exception $ oException) {$ sError = $ oException-> GetMessage (); } // If xml is valid and the empty call is not loaded: if (empty ($ sError) & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; Pre> Otherwise you might need to parse the string via HTML for the comment:
No comments:
Post a Comment