Jump to content

GPX GPSBabel Error?


RocketMan

Recommended Posts

I am using GPSBabel to convert from GPX to Garmin Mapsouce and most of the time it works great, but I get the following error with some of my GPX files:

 

"GPX: XML parse error at 6741: reference to invalid character number"

 

Does anyone have an idea what is wrong and how I can get the misbehaving files to convert properly?

 

Thanks,

RM

Link to comment

Feel free to send me the GPX file in question for me to cast my scepter of judgement upon it.

 

However, I'll already bet this is the problem I (and many others) notified Geocaching.com about where they allow illegal characters into the files which results in XML that won't validate. Validating XML parsers are *required* to halt processing upon seeing such a file.

 

I've sent the details to contact@ and analyzed it in the forums, but have gotten no response, so I don't know when or if this will be fixed.

Link to comment

Rocket Man sent me one of the affected files. Sure enough, the file contains illegal XML in exactly the way I've been

describing for some time.

 

(robertl) rjloud:/home/robertl/xerces-c1_7_0-linux7.2/bin

$ ./SAX2Count /tmp/4307.gpx

 

Fatal Error at file /tmp/4307.gpx, line 6741, char 6

 

 

The log that's triggering the failure is in GC91F5. The key

excerpt is

 

I left some of Lorenzo's Gold (GC5193) and alien items from First Contact cache

(GC4614). I took the Twin peaks cards. ''Diane, 5:30 PM, I am holding in my hand

a geocache...'' icon_wink.gif^M

^M

Parsa^M

.^M

</Groundspeak:text>^M(The forum eats the ampersand sharp x B semicolon that is here)

</Groundspeak:log>^M

<Groundspeak:log id="636583">^M

<Groundspeak:date>2002-09-28T07:00:00</Groundspeak:date>^M

<Groundspeak:type>Found it</Groundspeak:type>^M

 

That gibberish that's an escaped character doesn't parse becuase that's

not specified as a legal character in the DTD. Offhand, your options

include at least the following:

 

Hand-edit them out of the file.

Fudge the query to exclude this cache. (And get nailed by the next one...)

Bribe Parsa to "fix" the offending log.

Bribe geocaching.com to disallow these bogus characters.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...