使用XML数据作为数组

I have a problem, I'm trying to get data from http://www.acquaintcrm.co.uk/propertyfunctions/propertysearch.asmx?op=GetDataV8

I have made the request and output the data to a file, properties.xml

The file gets filled with data, but I just dont know how to use that data, I would like to convert the xml data into an array, but I honestly don't know where to start.

My code

$xml_data = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <GetDataV8 xmlns="http://www.AcquaintCRM.co.uk/propertyfunctions/">
          <strSitePrefix>STDZ</strSitePrefix>
          <intSiteID>-1</intSiteID>
          <intPropertyID>0</intPropertyID>
          <intPropertyDevelopmentID>0</intPropertyDevelopmentID>
          <bytBedrooms>0</bytBedrooms>
          <decMinPrice>0</decMinPrice>
          <decMaxPrice>0</decMaxPrice>
          <bytTenure>1</bytTenure>
          <intCommercial>-1</intCommercial>
          <bytPropertyAge>0</bytPropertyAge>
          <intRentalTerms>0</intRentalTerms>
          <bytFeaturedCount>0</bytFeaturedCount>
          <strAreas></strAreas>
          <strTypes></strTypes>
          <bytSortOrder>0</bytSortOrder>
          <bytUseCDataTags>0</bytUseCDataTags>
        </GetDataV8>
      </soap:Body>
    </soap:Envelope>
';

$url = "http://www.acquaintcrm.co.uk/propertyfunctions/propertysearch.asmx?op=GetDataV8";

$headers  = array(
  "POST * HTTP/1.1",
  "Content-type: text/xml;charset=\"utf-8\"",
  "Accept: text/xml",
  "Cache-Control: no-cache",
  "Pragma: no-cache",
  "Content-length: ".strlen($xml_data),
  "SOAPAction: http://www.AcquaintCRM.co.uk/propertyfunctions/GetDataV8",
);

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data);

$response = curl_exec($ch);

if (curl_errno($ch))
{
    echo 'Error: ';
    echo curl_error($ch);
}
else
{
  curl_close($ch);

  $xml = file_put_contents('properties.xml', $response);

  $xml = simplexml_load_file('properties.xml');

  print_r($xml);

}

The XML file can be viewed here

http://manchester.studentdigz.com/properties.xml

Thank you all in advance, I appreciate all help!

You can use php simplexml (http://php.net/manual/en/book.simplexml.php) to load the string in an object.

Note that if you really want an array you could as well do :

$xml = simplexml_load_string($xmlstring)->children('http://schemas.xmlsoap.org/soap/envelope/')->children('Body');
$json = json_encode($xml);
$array = json_decode($json,TRUE);

echo "<pre>";
echo "xml object : <br/>"; 
var_dump($xml);
echo "<hr/>";
echo "json string : <br/>"; 
var_dump($json);
echo "<hr/>";
echo "array : <br/>"; 
var_dump($array);