• Willkommen im Geoclub - dem größten deutschsprachigen Geocaching-Forum. Registriere dich kostenlos, um alle Inhalte zu sehen und neue Beiträge zu erstellen.

search output as xml

OP
S

sorer

Geocacher
i dont want to get them all in one request. I want get 20 caches, so i can put a "count" parameter in url, as a "startat" parameter too. But in gpx there is no info how much is them total.
 
OP
S

sorer

Geocacher
I'm a developer of geocaching app columbus and want to add support for opencaching.

I need to display a list of caches, total records in list screen.

ss-0-320-480-160-1-5aa2e7f2fbfc92b7e22ab715ead1c31559f9dc01


XML output is ideal for that, except two things:
- the type tag is localized, ideal would be with "id" attribute like: <type id="2">Traditional</type>
- the size is localized too, ideal would be with "id" attribute like: <size id="1">Mikro</size>

GPX format has much information that i dont need, like description, logs etc, and dont contains info about total caches like in xml

Code:
<docinfo>
		<results>443</results>
		<startat>1</startat>
		<perpage>50</perpage>
	</docinfo>

So if opencaching can get me a xml format, and idealy add ids to type and size it would be great.
Xml works in opencaching.us, opencaching.org.uk, opencaching.cz, but there is still problem with type and size when is localized like in geocaching.cz version.
 

BriToGi

Geowizard
Hm, you are a developer, you have to "read" the output data before processing it, why don't you count them yourselve before output is processed?

If you seperate "processing the data" and "output", it should be no problem?!

1. Read oc.de-output
2. process all data (including counting...)
3. output the data
 
OP
S

sorer

Geocacher
I need to read minimum data. Maximize speed and minimize data transfer. So i need to get small file with 20 caches, basic info about them(without description and logs), but also info how many caches are in total list.
 

BriToGi

Geowizard
Now I understand, while using the geocaching.cz page, you use the small xml output for the overwiew and load the cache details later (like groundspeak app), you should ask the opencaching.de-Team to maybe implement the xml-output...

@Schrottie, wenn Euch schon jemand die Arbeit abnimmt ne App zu bauen, wäre das nicht DER Moment eine XML-API zur Verfügung zu stellen? ;-)
 
OP
S

sorer

Geocacher
yeah, you got it. I dont know where to ask for this xml implementation. so i wrote it here.
 
A

Anonymous

Guest
BriToGi schrieb:
@Schrottie, wenn Euch schon jemand die Arbeit abnimmt ne App zu bauen, wäre das nicht DER Moment eine XML-API zur Verfügung zu stellen? ;-)
Eine readonly XML-Schnittstelle gibt es schon. Um auch schreibenden Zugriff zu kriegen ist XML aber eher ungünstig. In Entwicklung ist so eine Schnittstelle aber auch schon, nur steht derjenige der das macht gerade im Prüfungsstreß und somit hängt die API aktuell in der Luft. Aber wenn Du Lust und Zeit hast, dann nur zu... :roll:

sorer schrieb:
yeah, you got it. I dont know where to ask for this xml implementation. so i wrote it here.

XML (readonly!) you can get here: http://www.opencaching.de/doc/xml/xml11.htm

But ask for permission at [email protected]!
 
OP
S

sorer

Geocacher
i dont need a writeable api.
In that xml i cant sort by nearest, and return many caches. I want to get only 20 caches.

Why you cant implement xml output for search.php as other opencaching sites?
 
A

Anonymous

Guest
sorer schrieb:
Why you cant implement xml output for search.php as other opencaching sites?
The other opencaching sites (not all) use another code than opencaching.de. In the future, the code of opencaching.de will be used at all opencaching nodes. Actually is running the code migration, so that the work (in this case the implementation of XML output) would be obsolete soon.
 

BriToGi

Geowizard
Schrottie schrieb:
Aber wenn Du Lust und Zeit hast, dann nur zu...

Ich komm ja so kaum noch zum Dosen suchen :nosmile:

Und hier bei mir hab ich auch noch nen Haufen Käfer die ich aus den Buchstaben pulen muss/will ... wenn mal Lust und Zeit da ist ;)

Schrottie schrieb:
so that the work (in this case the implementation of XML output) would be obsolete soon.

Und ich glaube damit hast Du einem User aus diesem Thread den Tag gerade komplett versaut (Und - ich bin es nicht) ;)
 

Oliver

Geowizard
Hi sorer,

sorer schrieb:
i want to search, and get the output as xml. As html it works, but with xml not.
(...)
Any suggestions? Thanks.

i looked into the problem and was able to install the feature of oc.pl to oc.de.
I have also added the id-tags you requested.
The status-names etc. are not localized at the moment (all english), but this may change.
And i added "total" in "docinfo" section.

Do you need further changes?

I will contact oc.pl to inform about the changes when you reviewed the changes.
But be prepared that the id's may be different on other nodes.

With kind regards,
Oliver
 
OP
S

sorer

Geocacher
Thanks a lot for quick implementation. Now i can add opencaching.de to columbus. If i found any problem i will write about it. And the ids are cool too. With opencaching.pl i got problem that i must be logged if i want to search. So i cant add it now to columbus. Maybe later, cause need some more coding.
 
Oben