$url = "myurl";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$passwordStr = "$this->username:$this->password";
curl_setopt($ch, CURLOPT_USERPWD, $passwordStr);
curl_setopt($ch, CURLOPT_HTTPHEADER,
array("Content-type: application/atom+xml"));
$successCode = 200;
$result = curl_exec($ch);
curl_exec obtains xml data from myurl, as expected, but simply echoes it in the output buffer. The value of $return is a simple boolean. Instead, I would like it to return the obtained xml data as an array or any other php object that I can process (without having to do any cumbersome ob_start output buffering). Is this possible or is there any workaround?