I have a site developed in php.I have to make a request with curl that retrieve me an xml and I have to parse it to save data into my database but return me this error:\[quote\] Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML\[/quote\]This is my code simplified:\[code\]$xml_data ="http://stackoverflow.com/questions/15473151/<?xml version='1.0' encoding='UTF-8'?><BOOKING type='COR' lang='it-IT' returnURLNeed='no' returnURL='http://' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='url'><DATA ALL_COUNTRIES='YES'/></BOOKING>";$URL ="my_url";$ch2=curl_init();curl_setopt($ch2, CURLOPT_URL, $URL);curl_setopt($ch2, CURLOPT_TIMEOUT, 180);curl_setopt($ch2, CURLOPT_HEADER, 0);curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch2, CURLOPT_POST, 1);curl_setopt($ch2, CURLOPT_POSTFIELDS,"XMLString=".$xml_data);curl_setopt($ch2, CURLOPT_SSL_VERIFYHOST, 1);curl_setopt($ch2, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch2, CURLOPT_SSLVERSION, 3); curl_setopt($ch2, CURLOPT_FOLLOWLOCATION, true);$httpHeader2 = array( "Content-Type: text/xml; charset=UTF-8", "Content-Encoding: UTF-8");curl_setopt ($ch2, CURLOPT_ENCODING, "gzip");$data2 = htmlspecialchars(curl_exec($ch2));$error2=curl_getinfo( $ch2, CURLINFO_HTTP_CODE );curl_close($ch2);$xml = new SimpleXMLElement($data2);foreach ($xml->DATA as $entry){ //parsing and save data into database}\[/code\]data that return to me is like this:\[code\]<?xml version="1.0" encoding="UTF-8" standalone="yes"?><RETURNDATA lang="it-IT" type="COR" xsi:noNamespaceSchemaLocation="url" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><MESSAGE>All Countries details and relevant city details</MESSAGE><DATA COUNTRY_CODE="ABW" CURRENCY_CODE="EUR"><COUNTRY_NAME>Aruba</COUNTRY_NAME><CURRENCY_NAME>euro</CURRENCY_NAME><COUNTRY_CITIES><CITY_DATA CITY_CODE="AUA"><CITY_NAME>Aruba</CITY_NAME></CITY_DATA></COUNTRY_CITIES></DATA><DATA COUNTRY_CODE="ALB" CURRENCY_CODE="EUR"><COUNTRY_NAME>Albania</COUNTRY_NAME><CURRENCY_NAME>euro</CURRENCY_NAME><COUNTRY_CITIES><CITY_DATA CITY_CODE="TIA"><CITY_NAME>Tirana</CITY_NAME></CITY_DATA></COUNTRY_CITIES></DATA></RETURNDATA>\[/code\]