-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Test code:
import gpxpy
gpx = gpxpy.parse("""\
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="test">
<metadata>
<name>Name</name>
<extensions>
<tag>value</tag>
</extensions>
</metadata>
<trk>
</trk>
</gpx>""")
print(gpx.metadata_extensions) # [<Element 'tag' at 0x123456789>]
gpx.name = None
print(gpx.to_xml())
"""
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/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" version="1.1" creator="test">
<trk>
</trk>
</gpx>
"""
gpx = gpxpy.parse(gpx.to_xml())
print(gpx.metadata_extensions) # []Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels