Can't figure out why this GPX-file doesn't validate...

R

Rinus Luijmes

I'm collection GPS-waypoints in the GPX-format (http://www.topografix.com/gpx.asp) which is XML.
This example file validates in XMLSpy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" creator="XMLSpy 2005" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="-16.81233333" lon="-67.84916667">
<name>HAYRA</name>
<desc>Cerro Hayra Kkollu</desc>
</wpt>
</gpx>

In the documentation of the GPX-format I found that one can add an elevation-value <ele>...</ele> to the waypoint (see: http://www.topografix.com/GPX/1/1/index.htm#type_wptType), but when I do,like so:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" creator="XMLSpy 2005" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="-16.81233333" lon="-67.84916667">
<name>HAYRA</name>
<desc>Cerro Hayra Kkollu</desc>
<ele>3704</ele>
</wpt>
</gpx>

It doesn't validate! XMLSpy gives this error: "Unexpected element 'ele' in element 'wpt'. Expected: src, link, sym, type, fix, sat, hdop, vdop, pdop, ageofdgpsdata, dgpsid, extensions". I can't figure out what is wrong here, maybe you gurus know what is wrong here??

TIA!

Rinus.
 
T

TopoGrafix

Rinus said:
I'm collection GPS-waypoints in the GPX-format (http://www.topografix.com/gpx.asp) which is XML.
This example file validates in XMLSpy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" creator="XMLSpy 2005" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="-16.81233333" lon="-67.84916667">
<name>HAYRA</name>
<desc>Cerro Hayra Kkollu</desc>
</wpt>
</gpx>

In the documentation of the GPX-format I found that one can add an elevation-value <ele>...</ele> to the waypoint (see: http://www.topografix.com/GPX/1/1/index.htm#type_wptType), but when I do, like so:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" creator="XMLSpy 2005" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="-16.81233333" lon="-67.84916667">
<name>HAYRA</name>
<desc>Cerro Hayra Kkollu</desc>
<ele>3704</ele>
</wpt>
</gpx>

It doesn't validate! XMLSpy gives this error: "Unexpected element 'ele' in element 'wpt'. Expected: src,
link,sym, type, fix, sat, hdop, vdop, pdop, ageofdgpsdata, dgpsid, extensions". I can't figure out what
is wrong here, maybe you gurus know what is wrong here??

The elements are in the wrong order. Follow the order listed in the
documentation and schema, ie, <ele> comes before <name> and <desc>.

For further help, join the GPX developers forum (link at
http://www.topografix.com/gpx.asp)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,250
Members
46,848
Latest member
Graciela Mitchell

Latest Threads

Top