vincentneo/CoreGPX

fallibleParsedData doesn't support GPX 1.0 parsing

OlKir opened this issue · 2 comments

OlKir commented

Thank you for maintaining a great and useful library!
I was happy to see that it now also supports GPX 1.0 files but my first attempts to parse one failed.

Looking into the code I found that flow to parse legacy GPX was added to parsedData() but fallibleParsedData(forceContinue: Bool) still contains hard check for 1.1 version.

I prefer to use fallibleParsedData as it throws error messages and could handle slightly disordered data. And I would be grateful if you add support for 1.0 parsing there as well.

Hi @OlKir,

Been a while since I touched the code on this v1 support, I think currently only .legacyParsingData() parses that for now. (if I recall correctly)

And yes, this brings up a good point where there isn't feature consistency when parsing between these gpx versions, which is something that I should work on.

Thanks for sending this issue in!

Just ran into this as well! :-) I'll be moving to parsedData() for now.