def parseTrack(self,el): trk = Track(**xmlutil.parse(self.NS,el,Track._scheme)) for seg in el.findall("{%s}trkseg" % self.NS): p = Path() for wpel in seg.findall("{%s}trkpt" % self.NS): p.append(self.parseWaypoint(wpel)) trk.append(p) return trk
def parseWaypoint(self,e): return Waypoint(**xmlutil.parse(self.NS,e,Waypoint._scheme))
def parseRoute(self,el): r = Route(**xmlutil.parse(self.NS,el,Route._scheme)) for wpel in el.findall("{%s}rtept" % self.NS): r.append(self.parseWaypoint(wpel)) return r