Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse GPX file (space character missing) #41

Open
kancur opened this issue Jun 16, 2022 · 0 comments
Open

Unable to parse GPX file (space character missing) #41

kancur opened this issue Jun 16, 2022 · 0 comments

Comments

@kancur
Copy link

kancur commented Jun 16, 2022

Hi there! First of all, thanks for your work on the parser.

I think I found a bug. I have a simple file that your parser is unable to parse, here's the content:

Please note there's no space after <gpx - as that seems to be the culprit

<?xml version="1.0" standalone="yes"?>
<gpx
   xmlns="http://www.topografix.com/GPX/1/1"
   creator="OziExplorer Version 3956f - http://www.oziexplorer.com"
   version="1.1"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

   <wpt lat="42.5237670" lon="3.0861500">
       <ele>3.9624</ele>
       <time>2018-11-29T09:57:01.397Z</time>
       <name><![CDATA[5E002]]></name>
       <cmt><![CDATA[- X - RB 5 - EST]]></cmt>
       <desc><![CDATA[- X - RB 5 - EST]]></desc>
   </wpt>
</gpx>

Here's a file that gets correctly parsed:
The only difference is that I added a space after <gpx

<?xml version="1.0" standalone="yes"?>
<gpx 
   xmlns="http://www.topografix.com/GPX/1/1"
   creator="OziExplorer Version 3956f - http://www.oziexplorer.com"
   version="1.1"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

   <wpt lat="42.5237670" lon="3.0861500">
       <ele>3.9624</ele>
       <time>2018-11-29T09:57:01.397Z</time>
       <name><![CDATA[5E002]]></name>
       <cmt><![CDATA[- X - RB 5 - EST]]></cmt>
       <desc><![CDATA[- X - RB 5 - EST]]></desc>
   </wpt>
</gpx>

Thanks, let me know if you need any more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant