parameters: (self)
return_statement: return ET.ElementTree(root)
docstring: Saves this multipath to a multipath xml tree (ElementTree)
docstring_summary: Saves this multipath to a multipath xml tree (ElementTree)
docstring_tokens: Saves this multipath to a multipath xml tree ( ElementTree )
function: def saveXML(self):
          """Saves this multipath to a multipath xml tree (ElementTree)"""
          from ..io import loader
          root = ET.Element("multipath")
          root.attrib = self.settings
          for sec in self.sections:
              xs = ET.Element("section")
              root.append(xs)
              xs.attrib = sec.settings
              for ikgoal in sec.ikObjectives:
                  xik = ET.SubElement(xs,"ikgoal")
                  if hasattr(ikgoal,'text'):
                      xik.text = ikgoal.text
                  else:
                      xik.text = loader.writeIKObjective(ikgoal)
              for h in sec.holds:
                  xh = ET.SubElement(xs,"hold")
                  xh.text = loader.writeHold(h)
              for h in sec.holdIndices:
                  xh = ET.SubElement(xs,"hold")
                  if isinstance(h,int):
                      xh.set("index",str(h))
                  else:
                      xh.set("name",str(h))
              for i in range(len(sec.configs)):
                  xm = ET.Element("milestone")
                  xs.append(xm)
                  xm.set("config",loader.writeVector(sec.configs[i]))
                  if sec.times != None:
                      xm.set("time",str(sec.times[i]))
                  if sec.velocities != None:
                      xm.set("velocity",loader.writeVector(sec.velocities[i]))
          for hkey,h in self.holdSet.items():
              xh = ET.Element("hold")
              root.append(xh)
              if not isinstance(hkey,int):
                  xh.set('name',str(hkey))
              xh.text = loader.writeHold(h)
          return ET.ElementTree(root)
function_tokens: def saveXML ( self ) : from . . io import loader root = ET . Element ( "multipath" ) root . attrib = self . settings for sec in self . sections : xs = ET . Element ( "section" ) root . append ( xs ) xs . attrib = sec . settings for ikgoal in sec . ikObjectives : xik = ET . SubElement ( xs , "ikgoal" ) if hasattr ( ikgoal , 'text' ) : xik . text = ikgoal . text else : xik . text = loader . writeIKObjective ( ikgoal ) for h in sec . holds : xh = ET . SubElement ( xs , "hold" ) xh . text = loader . writeHold ( h ) for h in sec . holdIndices : xh = ET . SubElement ( xs , "hold" ) if isinstance ( h , int ) : xh . set ( "index" , str ( h ) ) else : xh . set ( "name" , str ( h ) ) for i in range ( len ( sec . configs ) ) : xm = ET . Element ( "milestone" ) xs . append ( xm ) xm . set ( "config" , loader . writeVector ( sec . configs [ i ] ) ) if sec . times != None : xm . set ( "time" , str ( sec . times [ i ] ) ) if sec . velocities != None : xm . set ( "velocity" , loader . writeVector ( sec . velocities [ i ] ) ) for hkey , h in self . holdSet . items ( ) : xh = ET . Element ( "hold" ) root . append ( xh ) if not isinstance ( hkey , int ) : xh . set ( 'name' , str ( hkey ) ) xh . text = loader . writeHold ( h ) return ET . ElementTree ( root )