This is probably so easy that no tutorial anywhere deals with it. Sorry but I just can not find where to start.
I have an XML file as follows
</gpx>
<trk>
<name>070626KappellerAlp</name>
<desc></desc>
<trkseg>
<trkpt lat="47.62788" lon="10.49729">
<ele>876.38</ele>
<time>2007-06-26T14:48:07.000Z</time>
</trkpt>
<trkpt lat="47.62777" lon="10.49757">
<ele>876.38</ele>
<time>2007-06-26T14:48:10.000Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
The only data I am interested in at the moment is between the <ele> tags. Later I will need others but not yet.
I want to open the file, find the first <ele>, do something with it and then go on to the next <ele> and do it again.
I want to cary on like this until there are no more <ele> left at which point I am finished.
It sounds so easy but for a newbie Python programmer it seems nearly impossible. I have read all about SAX and that seems to be what I need but I am totally confused.
Could one of you experts please spare a few minutes to point me in the correct direction.
Thank you very much in advance.
For any one interested - this is part of a mountain bike track in GPX format and I am aiming at a profiler that calculates climb and descent based on a freely given threshhold.
Bookmarks