You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want togeojson to detect for when XML is invalid ( #85 ) and report that or throw an error or something, so that this isn't the silent failure it is today.
In terms of the present, though - the parsing error is probably happening in parseFromString off of the DOMParser. DOMParser in the browser doesn't have any options for whether to be strict or lenient - it just parses what it does and doesn't parse what it doesn't - and it won't parse this XML. I think trying to use DOMParser and messing with the XML source to make invalid documents valid… would be tough.
There's another route which is probably better: the @xmldom/xmldom NPM module that togeojson-cli uses and Placemark uses is more lenient and will allow documents with invalid namespaces. Might want to try that, in place of using DOMParser - togeojson works with its generated DOM the same way it works with the browser one.
Hi Tom!
I've got this report of a file that cannot be imported in uMap, while it is read by other softwares like Viking, Gnome Maps or VisuGPX.
It seems that the file is invalid, because missing the correct namespace for
gpxx
.Here is the file:
3Septembre.zip
How do you see that ? Is there a short path to work around that invalid file (like ignoring tags with non declared namespace or such) ?
I'm invoking the Robustness principle :)
Thanks in advance!
Yohan
Initial ref: https://forum.openstreetmap.fr/t/fichier-gpx-qui-ne-semble-pas-fonctionner-sur-umap/17640 (in French)
The text was updated successfully, but these errors were encountered: