Jump to content

Xml Schema For .loc?


Aslan

Recommended Posts

Does anyone know where I can find the XML schema for the .loc files? I have the schema for GPX.

 

I thought it would be a fun JAVA project to write a parser for the .loc's to transform them to gpx format.

 

(I suppose I could do it using XSLT, so if anyone has an XSLT defined to do so, I'd appreciate it.)

 

Thanks in advance!

Link to comment

Thanks!

 

Was really looking to do some software development myself, sorta as an exercise - I'm a MAC user and thought it mught be fun to put some JAVA code together that was platform independant and put it out as an open source project...

 

but I will look at the packages mentioned.

Link to comment

If you do find a schema or specification for LOC files, please post a reply in this thread. I've written a simple parser for LOC files based on files downloaded from geocaching.com, but it would be nice to have a definite description of the format, in case there are some exotic cache types that have additional fields or attributes.

 

A detail I found while writing the parser - the XML header says that the encoding is ISO-8859-1, but it looks more like UTF-8. Characters like å, ä, ö are encoded using two bytes.

Edited by larsl
Link to comment
If you do find a schema or specification for LOC files, please post a reply in this thread. I've written a simple parser for LOC files based on files downloaded from geocaching.com, but it would be nice to have a definite description of the format, in case there are some exotic cache types that have additional fields or attributes.

 

A detail I found while writing the parser - the XML header says that the encoding is ISO-8859-1, but it looks more like UTF-8. Characters like å, ä, ö are encoded using two bytes.

No schema is called out in the header. I doubt one exists.

 

I, too, have been bitten by the charset encoding. There's some definite weirdness around it. IIRC you get one set of headers from the "seek" page that lists 20 at a shot and another set of headers if you download it straight from the cache page. One of the geocaching.com's that's not based in the US (and I don't recall which one, but it bit me in GPSBabel) uses yet another strain of encodings in their .loc.

Link to comment

Using different encodings is alright, though, as long as they're reported correctly. According to larsl, that's not always the case.

 

Agreed on the schema, though... if you can't figure it out by looking at examples downloaded from the site, I doubt you'll be able to find one anywhere.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...