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>
XML not returning any matches?
Re: XML not returning any matches?
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"
"In a world gone mad, only a lunatic is truly insane"
- RVRoadTrip
- Site Admin
- Posts:533
- Joined:Tue Aug 03, 2010 3:04 pm
- Contact:
Re: XML not returning any matches?
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.
Re: XML not returning any matches?
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.
- RVRoadTrip
- Site Admin
- Posts:533
- Joined:Tue Aug 03, 2010 3:04 pm
- Contact:
Re: XML not returning any matches?
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.
Re: XML not returning any matches?
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.
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.
Re: XML not returning any matches?
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.
- RVRoadTrip
- Site Admin
- Posts:533
- Joined:Tue Aug 03, 2010 3:04 pm
- Contact:
Re: XML not returning any matches?
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.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.