ddf standard xml format returns no records
I am using the code below to query the CREA DDF/RETS to retrieve listings
in the XML format. When I specify the Standard-XML format, I get no
records with no errors.
If I do not specify the format, PHRETS defaults to Compact-Decoded format
and records are returned.
code
require('phrets.php');
$rets = new phRETS;
$criteria = 'LastUpdated=2012-01-01';
$limit = 10;
$options = array('Limit' => $limit, 'Format' => 'Standard-XML'); # also
tried STANDARD-XML - wasn't sure if it was case sensitive
$search = $rets->SearchQuery('Property', 'Property', $criteria, $options);
$total_records = $rets->TotalRecordsFound();
$error_info = $rets->Error();
echo "error (code {$error_info['code']}): {$error_info['text']}\n";
echo $total_records." - total_records\n";
$rets->FreeResult($search);
$rets->Disconnect();
results
error (code ):
0 - total_records
No comments:
Post a Comment