kb0 / dart-gpx

Dart package for load, manipulate, and save GPS data in GPX format (a light-weight XML data format for the interchange of GPS data - waypoints, routes, and tracks).
Apache License 2.0
24 stars 27 forks source link

CDATA in name is not working #16

Closed 0xecute closed 2 years ago

0xecute commented 2 years ago

Hi, If we have a waypoint with a string as CDATA, then it is not working. Example:

<wpt lat="42.410045" lon="9.411127">
<ele>710.7</ele>
<time>2022-04-14T08:50:34.924+02:00</time>
<name><![CDATA[Parking]]></name>
<desc><![CDATA[]]></desc>
<type><![CDATA[]]></type>
</wpt>

It is read by the library as a XmlCDATAEvent, with the correct text, but then in the "_readString" method in gpx_reader.dart, it doesn't take this case into account.

Can you fix it? I can do a PR if you want.

Thank you for your job !

kb0 commented 2 years ago

fixed in 2.1.1

0xecute commented 2 years ago

Wow you are like superman ! :-D Thanks !