Corrupted gpx file?

Former Member
Former Member
Hi all! I was reading all the .gpx files in the Archive folder in my nüvi 205W but one of them seems to be corrupt. I was trying to read it in BaseCamp but tried reading in MapSource and Google Earth with the same results. None of them can read this specific file.

I also tried GPS Babel to see if I can read it but it reports a parsing error. :confused: What can be done with this file? I open it in Notepad but this is not something I can tell if anything is wrong.

Suggestions?
  • Former Member
    0 Former Member over 14 years ago
    GPS Babel provides this result:

    gpsbabel -D0 -w -r -t -i gpx -f C:/4.gpx -o gpx -F C:/test.gpx
    GPX: XML parse error at line 1 of 'C:/4.gpx' : mismatched tag
  • Former Member
    0 Former Member over 14 years ago
    If you attach the file here, someone might be nice enough to see if he/she can fix it.
  • Former Member
    0 Former Member over 14 years ago
    Here it is. Compressed to save space.

    [Attachment removed]
  • I was going to take a look but it's a giant track log ( >1MB) and the Nuvi did not put in any line breaks. When I view it in my text editor it's one single line of text. I'm afraid I don't have the dedication to try to visually parse a one-line GPX file that size to see where the problem is. I'm afraid I will go cross-eyed before I get through the first few hundred <trk></trk> tag pairs. :eek:

    For anyone who is thinking the error message saying that the error is at Line 1 is helpful in isolating where the error is, please go back and read the previous paragraph (hint: there is only one line in the file and it's 1MB long).

    For whatever it's worth, my editor has an XML syntax checker plugin and it gives a similar error but with a slightly different explanation:

    XML Parsing error at line 1:
    Premature end of data in tag gpx line 1


    I thought that might be useful. I figured perhaps the closing </gpx> tag might be missing but when I check at the end of the file, it's there. So it's something else. So this error is no more useful than the other one. E.g. All of the data lives between the <gpx> tag at the start of the file and the </gpx> tag at the end of the file. So the total combined information from the two parsing error messages simply tells us that the error is somewhere in the file. :rolleyes:

    ...ken...
  • Former Member
    0 Former Member over 14 years ago
    Hate to brag but TopoFusion comes thru again. Clicked on the original "one line file" and TF opened that bad boy right up. Then "saved as" a gpx file again with a different name. Then opened it in MapSource and could edit the data.

    There were 20 some tracks that look like car trips on the island of Puerto Rico. I found 2-3 really bogus waypoints of over 4000 miles. Those were probably what caused the errors in the other softwares. The speeds are very erratic and some elevations are negative which could be from heavy tree cover causing poor satellite reception.

    I joined the tracks together that obviously were recorded at the same time and day. I have attached the corrected file.

    I checked the file again just before closing out and noticed that at least one track had a block of waypoints out of sequence according to the timestamps. I did not fix it. There may be more things wrong with this file that I attached but it will open in MapSource and can be edited by whomever.
  • Former Member
    0 Former Member over 14 years ago
    I tried this TopoFusion program myself after you stated that it was able to open the file. I didn't know about this program. Thanks!! I found just one strange point pointing to latitude 0° and longitude 0°. I deleted just that particular point. Everything else seems to be alright. I did the same thing you, saved to a new file and then everything was readable again. Thanks a lot!! ;)

    Just curious about why you find the speed to be erratic. This is quite typical for trips involving surface streets and freeways where there are also changes in elevation and traffic. The track with negative elevations was taken right at the water's edge at a beach near my home. I was keeping tracking some points in this area. Elevation was not important that day. It is known that since GPS may be a bit way off in elevation, negative elevations may result from usage at or near sea level. I did not find any other track with negative elevations.
  • Former Member
    0 Former Member over 14 years ago
    There were 20 some tracks that look like car trips on the island of Puerto Rico.


    Ah yes... that's where I live. Just look at my profile. :p
  • Former Member
    0 Former Member over 14 years ago
    I'm glad TopoFusion worked for you. It is my favorite gps software program.
  • Former Member
    0 Former Member over 14 years ago
    corrupt current.gpx

    Im hoping someone can help me with my corrupt current.gpx file from a nuvi `1350. I am unable to open this file in mapsource. I cannot convert it with gps babel and when i try to open it with an xml editor (XML Notepad 2007) I get the following error.
    Error loading: pathname\current1.gpx
    '&#3374;', hexadecimal value 0x0E, is an invalid character. Line 4, position 7465.

    Email me if you can help and ill send you the file.

    Any help would be greatly appreciated.