示例#1
0
 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
示例#2
0
 def parseWaypoint(self,e):
   return Waypoint(**xmlutil.parse(self.NS,e,Waypoint._scheme))
示例#3
0
 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