TrailCam

Guides

Is a GPX file just an XML file?

Yes. GPX is not a separate binary format sitting next to XML — it is a particular, fixed way of structuring XML, defined so that GPS coordinates always end up nested under the same tags no matter which device or app wrote them. Every GPX file is valid XML underneath. What is worth untangling is the other direction: not every XML file is a GPX file, and the .gpx extension on top is doing less work than it looks like it is doing.

The short answer

Open a .gpx file in any plain text editor and the first line is typically an XML declaration, followed by a <gpx> tag wrapping everything else — the same nested-tags-and-attributes syntax as any other XML document. GPX is best described as a schema: a specific, published set of rules for which tags are allowed inside that <gpx> element, what a track point looks like, and where a timestamp or an elevation value goes. The file format underneath is plain XML the whole time; GPX is the vocabulary layered on top of it.

That means the .gpx extension is a label, not an ingredient. It tells a program what to expect before it opens the file, but it adds nothing to the bytes inside, and it takes nothing away if it is missing or wrong.

What actually makes a file a GPX file

A parser reading a file does not care what the file is called. What it looks for is structure: a root <gpx> element carrying a version and a creator attribute, and, nested inside it, some combination of <trk>, <rte> and <wpt> elements holding the actual coordinates. A file earns the description "a GPX file" by containing that structure, whatever its name happens to be on disk. A file named export.gpx that does not contain a <gpx> root element is not a GPX file with a correct name; it is some other kind of file wearing the wrong extension.

This is worth separating clearly from the extension, because the two usually agree but are not the same claim. The extension is metadata about the file, stored in the filename itself. The <gpx> structure is the file.

Why the extension matters anyway, in practice

If the extension adds nothing to the underlying content, it is fair to ask why anything ever rejects a file over it. The answer is speed. Checking a filename takes no time at all — a program can look at the last few characters and decide instantly whether a file is worth attempting to open. Actually parsing a file to see whether it contains valid GPX structure takes real work, and most upload tools are not willing to spend that effort on every file a person might hand them, including ones that are obviously the wrong kind. So a website or an app commonly filters on the extension first, as a cheap first pass, and only parses the content of whatever gets through that filter.

That first pass is where a perfectly valid GPX track can get turned away for a reason that has nothing to do with its content: it was named export.xml, or track.txt, and never made it past the filename check to have its actual structure looked at.

What renaming does and does not fix

Since the extension carries no weight inside the format itself, renaming a file from .xml to .gpx does not touch a single byte of what is inside it — it only changes which filename-based filters the file is able to walk through afterward. If a download came out named something.xml and opening it in a text editor shows a <gpx> root element near the top, that file already is a GPX track; renaming it to something.gpx is safe, and is often exactly what an upload tool that rejected the original name was waiting for.

What renaming cannot do is turn a file into GPX data it does not already contain. A GPX file is defined by the tags inside it, not by its filename, so renaming an unrelated XML document — a web feed, an app's configuration file, anything that happens to also use XML syntax for a completely different purpose — to end in .gpx does not give it a <gpx> root element or any track points. A program that actually parses the content, rather than trusting the extension, will still find nothing it recognises, whatever the file is called.

Why some exports come out as .xml in the first place

This usually traces back to a general-purpose export path rather than anything wrong with the data. Some older systems, and some workflows that were built to hand off geographic data broadly rather than GPX specifically, save through a generic 'export as XML' step that writes the correct GPX structure inside but does not bother naming the file to match. A browser's own 'Save Page As' can do something similar with content it does not specifically recognise as GPX. In every case, the content saved is unaffected — it is only the label on the outside that came out generic.

Where TrailCam fits in

When TrailCam exports a route, it writes a GPX 1.1 file with the .gpx extension already on it, so there is nothing to rename before handing it to Strava, Garmin Connect, Komoot or anywhere else that expects a GPX track. GPX export is part of the optional TrailCam Pro upgrade; the app itself is free to download.

Questions

Can I open a .gpx file by just changing it to .xml?
Yes — a text editor or a browser will show the same tags either way, since neither one is doing anything with the extension beyond deciding how to display the file. A program built to specifically route GPX uploads, though, may only recognise it once it is back to .gpx.
Will renaming a .xml file to .gpx fix an upload that got rejected?
It will, if the file already contains valid GPX structure and the rejection was based on the filename alone. Open it in a text editor first and check for a <gpx> tag near the top — if that is there, the rename is safe and usually solves exactly this problem.
Does GPX version 1.0 versus 1.1 change whether a file counts as XML?
No. Both versions of GPX are XML documents; the version number only changes which tags the schema allows and where a few values are permitted to live, not the underlying file syntax.

Recording your own routes

TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.

Download on the App Store