Closed esisa closed 10 years ago
Here is an example of the string I use. This renders fine elsewhere.
data = '<?xml version="1.0" encoding="UTF-8"?><gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" version="1.0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd" creator="gpx.py -- https://github.com/tkrajina/gpxpy"><rte><rtept lat="44.907783722" lon="6.05487864642"><ele>1298.0</ele></rtept><rtept lat="44.9077732488" lon="6.05518996909"><ele>1301.0</ele></rtept></rte></gpx>';
A documentation bug - right now the GPX parser expects an XML DOM rather than a string. I'll move the dom parsing parts behind the parse step so the docs & behavior match.
Aha... thanks!
Fixed & deployed in 0.0.1.
If I try to read a.gpx as a string I get the following error:
TypeError: x.getElementsByTagName is not a function Line 542
Reading it as a file however, works just fine.