My site communicates with a remote API to synchronize databases. The data I receive is in XML and 999 out of 1000 times this is proper XML which I can directly parse using simplexml_load_string
.
Yet 1 out of 1000 times I get incorrectly encoded XML as shown in the attached image below.
I must somehow parse this gibberish, because trying to GET the same record will again give the same result.
If you have a suggestion on how to convert this, please let me know. I have tried the following functions but I am not a decoding expert so there were just shots in the dark: