Aslan Posted April 4, 2004 Share Posted April 4, 2004 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! Quote Link to comment
+as77 Posted April 4, 2004 Share Posted April 4, 2004 gpsbabel can do it but it actually doesn't make much sense because LOC files contain very limited information (name of the cache and coordinates, that's it). If you just look at a LOC file, you'll see it's extremely simple. Quote Link to comment
+Lone Duck Posted April 4, 2004 Share Posted April 4, 2004 If you use GSAK to export the watpoints as a CSV file for Streets and Trips, it'll be in the format need for Excel. I blundered into that today. Perhaps Babel can also export the file in CSV format as well, since GSAK uses Babel as a back end. Quote Link to comment
Aslan Posted April 5, 2004 Author Share Posted April 5, 2004 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. Quote Link to comment
+larsl Posted April 20, 2004 Share Posted April 20, 2004 (edited) 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 April 20, 2004 by larsl Quote Link to comment
robertlipe Posted April 20, 2004 Share Posted April 20, 2004 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. Quote Link to comment
+Maeglin Posted April 20, 2004 Share Posted April 20, 2004 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. Quote Link to comment
robertlipe Posted April 20, 2004 Share Posted April 20, 2004 Using different encodings is alright, though, as long as they're reported correctly. According to larsl, that's not always the case. Sorry I was unclear. I was supporting his point. They are different and they aren't reported correctly in the header. Quote Link to comment
Recommended Posts
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.