parameters: (self, filepath=None, encoding='UTF-8')
return_statement: return filepath
docstring: Export flows to SUMO xml file formate.
docstring_summary: Export flows to SUMO xml file formate.
docstring_tokens: Export flows to SUMO xml file formate .
function: def export_sumoxml(self, filepath=None, encoding='UTF-8'):
          """
          Export flows to SUMO xml file formate.
          """
          print 'export_sumoxml', filepath, len(self)
          if len(self) == 0:
              return None
  
          if filepath is None:
              filepath = self.get_flowfilepath()
  
          try:
              fd = open(filepath, 'w')
          except:
              print 'WARNING in export_sumoxml: could not open', filepath
              return False
          #xmltag, xmltag_item, attrname_id = self.xmltag
          #fd.write('<?xml version="1.0" encoding="%s"?>\n'%encoding)
          #fd.write('<kml xmlns="http://www.opengis.net/kml/2.2">\n')
          indent = 0
          #fd.write(xm.begin('routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.sf.net/xsd/routes_file.xsd"',indent))
  
          self.write_xml(fd, indent=0)
  
          fd.close()
          return filepath
function_tokens: def export_sumoxml ( self , filepath = None , encoding = 'UTF-8' ) : print 'export_sumoxml' , filepath , len ( self ) if len ( self ) == 0 : return None if filepath is None : filepath = self . get_flowfilepath ( ) try : fd = open ( filepath , 'w' ) except : print 'WARNING in export_sumoxml: could not open' , filepath return False #xmltag, xmltag_item, attrname_id = self.xmltag #fd.write('<?xml version="1.0" encoding="%s"?>\n'%encoding) #fd.write('<kml xmlns="http://www.opengis.net/kml/2.2">\n') indent = 0 #fd.write(xm.begin('routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.sf.net/xsd/routes_file.xsd"',indent)) self . write_xml ( fd , indent = 0 ) fd . close ( ) return filepath