Jump to content

Invalid XML in GPX


rragan

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

Link to comment
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.

 

 

Link to comment
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

Link to comment
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. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...