XML not returning any matches?

For reporting issues with the OCNA site.
Post Reply
shaggy
Posts:5
Joined:Mon Sep 27, 2010 8:45 pm
XML not returning any matches?

Post by shaggy » Wed Nov 03, 2010 9:31 am

When I try the examples for xml elsewhere in the forums, I never seem to get any matches. I've tried variations on the following url

http://www.opencaching.de/xml/ocxml11.p ... ct%20=%201

and only get the following reply. Doesn't look like there is anything to retrieve with subsequent calls.

<ocxmlsession>
<sessionid>734108</sessionid>
<records user="0" cache="0" cachedesc="0" cachelog="0" picture="0" removeobject="0"/>
</ocxmlsession>

User avatar
glorkar
Posts:422
Joined:Mon Aug 09, 2010 10:34 am
Location:Oshkosh/Berlin, Wisconsin

Re: XML not returning any matches?

Post by glorkar » Wed Nov 03, 2010 10:34 am

Love to help you, but I'm totally clueless when it comes to XML. I know HTML pretty well and BB tags, but that's about it.
Opencaching.us Global Moderator
"In a world gone mad, only a lunatic is truly insane"

Image

User avatar
RVRoadTrip
Site Admin
Posts:533
Joined:Tue Aug 03, 2010 3:04 pm
Contact:

Re: XML not returning any matches?

Post by RVRoadTrip » Wed Nov 03, 2010 2:13 pm

I think the XML you are referring to is sample code for iPhone and Android developers. Any reference to an opencaching site in the code should point to OCUS (the sample code likely originated at the German OC site, thus OCDE.

shaggy
Posts:5
Joined:Mon Sep 27, 2010 8:45 pm

Re: XML not returning any matches?

Post by shaggy » Wed Nov 03, 2010 3:12 pm

The example I pasted came from http://www.opencaching.us/doc/xml/ocxml11.txt. I've tried changing opencaching.de to opencaching.us with the same result. I've also tried other examples as well. None seem to result in any response other than that previously posted. The sessionid does increment, but that is all.

User avatar
RVRoadTrip
Site Admin
Posts:533
Joined:Tue Aug 03, 2010 3:04 pm
Contact:

Re: XML not returning any matches?

Post by RVRoadTrip » Wed Nov 03, 2010 7:00 pm

From what little I understand of XML, the file is designed to show formatting of sample data and how to pull it. Other than that, I have no idea. You'd need to find someone experienced with XML to explain the structure. The file was provided to us from the OCPL site.

shaggy
Posts:5
Joined:Mon Sep 27, 2010 8:45 pm

Re: XML not returning any matches?

Post by shaggy » Wed Nov 03, 2010 9:55 pm

BTW, I have written a few Android apps and work with xml quite often.

The problem isn't understanding the xml. It's that I'm not getting any results. From the page mentioned earlier, I expect a return like the following showing data is available.

<xml version = "1.0"?
<ocxmlsession>
<SessionID> 12345 </ sessionid>
<Record user="193" cache="211" cachedesc="235" cachelog="439" picture="108" removeobject="19" />
</ ocxmlsession>

but I get

<ocxmlsession>
<sessionid>734108</sessionid>
<records user="0" cache="0" cachedesc="0" cachelog="0" picture="0" removeobject="0"/>
</ocxmlsession>

which seems to say no records are available. The sessionid increments, but all fields seem to say there are 0 records.

shaggy
Posts:5
Joined:Mon Sep 27, 2010 8:45 pm

Re: XML not returning any matches?

Post by shaggy » Wed Nov 03, 2010 10:27 pm

Ahhh, finally figured it out. It doesn't like the spaces in the url. Removing all the spaces returned records. The problem is in the documentation (http://www.opencaching.us/doc/xml/ocxml11.txt). I'd be happy to work on it if you could tell me how to return/upload it.

User avatar
RVRoadTrip
Site Admin
Posts:533
Joined:Tue Aug 03, 2010 3:04 pm
Contact:

Re: XML not returning any matches?

Post by RVRoadTrip » Thu Nov 04, 2010 7:43 am

shaggy wrote:Ahhh, finally figured it out. It doesn't like the spaces in the url. Removing all the spaces returned records. The problem is in the documentation (http://www.opencaching.us/doc/xml/ocxml11.txt). I'd be happy to work on it if you could tell me how to return/upload it.
You can email it to me, that'd be great. And I didn't mean to imply you didn't understand it, I meant to imply that "I" didn't understand it. :)

Post Reply