f



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

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=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
<gpx xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" version=3D"1.1" =
creator=3D"XMLSpy 2005" =
xsi:schemaLocation=3D"http://www.topografix.com/GPX/1/1 =
http://www.topografix.com/GPX/1/1/gpx.xsd" =
xmlns=3D"http://www.topografix.com/GPX/1/1">
<wpt lat=3D"-16.81233333" lon=3D"-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=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
<gpx xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" version=3D"1.1" =
creator=3D"XMLSpy 2005" =
xsi:schemaLocation=3D"http://www.topografix.com/GPX/1/1 =
http://www.topografix.com/GPX/1/1/gpx.xsd" =
xmlns=3D"http://www.topografix.com/GPX/1/1">
<wpt lat=3D"-16.81233333" lon=3D"-67.84916667">
	<name>HAYRA</name>
	<desc>Cerro Hayra Kkollu</desc>
	<ele>3704</ele>=09
</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.
0
digirini (3)
8/2/2005 6:59:32 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

1 Replies
1144 Views

Similar Articles

[PageSpeed] 31

Rinus Luijmes wrote:
> 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)

--
Dan Foster
TopoGrafix

0
8/3/2005 11:42:27 AM
Reply: