Jump to content
rragan

Invalid XML in GPX

Recommended Posts

i did a cache title search with Cachly and imported it into Geosphere. The import failed with the error shown in attachment. I then recreated the list of caches in Geosphere and imported them into Cachly to see how the error is handled. It fails in the same way but there is no information to let me know the cache with the bad text so I can avoid it. Showing the problem entry helps a lot.

 

Better yet would be to report the offending entry and continue the import with the next cache. The way you process the XML may prevent doing this. Curiously, I can load the cache in both apps and export ok. Only the import fails. 

image.png

image.png

Share this post


Link to post
Share on other sites

Excellent suggestion about adding additional error information in the error message. Here is what it will look like:

Screen Shot 2017-02-22 at 11.50.34 PM.png

6 hours ago, rragan said:

Better yet would be to report the offending entry and continue the import with the next cache. The way you process the XML may prevent doing this. Curiously, I can load the cache in both apps and export ok. Only the import fails. 

It wouldn't be easy to skip just that cache as the XML Parser is what bails on error.

This is an XML spec error with invalid characters, so it only applies to XML and doesn't affect anything when normally viewing the cache in Cachly.

 

 

Share this post


Link to post
Share on other sites

Yes it would be tedious to fix problem characters in an xml as you'd have to edit it to something else, then parse it again. It could happen any number of times until the parser successfully loads the entire file.  It'd be nice if it were possible to skip invalid character errors, but that opens a whole can of development worms :P

Share this post


Link to post
Share on other sites
2 hours ago, thebruce0 said:

It'd be nice if it were possible to skip invalid character errors, but that opens a whole can of development worms :P

My take on this is to fix the errors as they come in from users so that it isn't an issue for all other users. There are many invalid characters that we currently clean before exporting to XML, so reports like this are extremely useful. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×