XML Parsing Error, No Data to Parse

74 views
Skip to first unread message

playfulfox...@gmail.com

unread,
Aug 29, 2020, 6:21:51 PM8/29/20
to PHRETS
Hello,

I am using the older version of PHRETS to pull in information and have started receiving 'XML Parsing Error, No data to Parse.' when running any Search Query.

The code was working before and checking RetsMD shows that the Property and Class are the same. I'm also still able to get stuff back when trying 'GetAllTransactions()' and 'capability_url' but not when trying 'GetMetadataResources()' or the SearchQuery.

I have included the code I am currently using to test for what's wrong, but with user information removed from the connect:

<?php
require_once("phrets.php");
$rets = new phRETS;
$connect = $rets->connect("-URL-","-USER-","-PASSWORD-");

if ($connect){

//This One Works
$transact= $rets->GetAllTransactions();
print_r($transact);
         //This Does Not Work
         $getre= $rets->GetMetadataResources();
          print_r($getre);
//This Does Not Work
$testing = $rets->Search("Property","A","*");
print_r($testing);

print_r($rets->Error());
?>

Any help would be really apreciated!

Sincerely,
Chris

W Bowley

unread,
Aug 30, 2020, 7:22:14 AM8/30/20
to phr...@googlegroups.com
Not knowing what the resource and class names are, it might be hard to debug here, but most RETS providers have the Property resource and class name the same, so your search would be:

$rets->Search("Property","Property","*");

Use https://www.retsmd.com/ with your credentials to see what the metadata is for the property table and use those values in the search.  You will also need a valid query (such as ListingKeyNumeric=0+), I don't know if passing "*" in will work for data versus downloading media.

--
You received this message because you are subscribed to the Google Groups "PHRETS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phrets+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/phrets/6d94eaab-03fa-4748-afbf-d33b94c26825n%40googlegroups.com.

Chris Baker

unread,
Aug 30, 2020, 9:57:04 AM8/30/20
to phr...@googlegroups.com
Hello,

Thank you for the response!

The Resource and Class name match what retsmd has for them; I did add in (LIST_1=0+) to where the '*' was (LIST_1 being my key field according to retsmd) but the response I get back was the same as before:
Array ( [type] => xml [code] => -1 [text] => XML parsing error. No data to parse ) 

Would there be anything else I could provide that might make it easier to help? I'm not really too sure what is and isn't useful for troubleshooting something like this.

Sincerely,
Chris 

You received this message because you are subscribed to a topic in the Google Groups "PHRETS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phrets/H_8kxRMTzho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phrets+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/phrets/CAE88oEbe%2BOp9D_kJnFsN0_WytKH0o-85-mzFfskYQjbF3XMc8w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages