I'm downloading an xml file using curl and then parsing it using simplexml_load_string()
and putting it to db.
I got a problem a that the file cannot be parse, its inside <![CDATA[]]>
and i notice the file has some sort of a special character that i really dont know:
I'm getting the file like so:
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $URL);
$contents = curl_exec($c);
curl_close($c);
and i'm parsing it like so:
$gpx = simplexml_load_string($myfile,'SimpleXMLElement', LIBXML_NOCDATA);
The error that I got is this:
simplexml_load_string(): Entity: line 7238: parser error : CData section not finished
How can i disregard those in to properly parse the xml file?
Thanks so much in advance.