code: def xmlGenScanList(scanList, scanListParams):
      
      numEntries = len(scanList)
      xmlScanList = ETREE.Element('scanList', {'count': str(numEntries)})
      maspy.xml.xmlAddParams(xmlScanList, scanListParams)
      for scan in scanList:
          #Note: no attributes supported
          xmlScan = ETREE.Element('scan', {})
          maspy.xml.xmlAddParams(xmlScan, scan['params'])
  
          #Generate the scanWindowList entry
          numScanWindows = len(scan['scanWindowList'])
          if numScanWindows > 0:
              xmlScanWindowList = ETREE.Element('scanWindowList',
                                                {'count': str(numScanWindows)}
                                                )
              for scanWindow in scan['scanWindowList']:
                  xmlScanWindow = ETREE.Element('scanWindow')
                  maspy.xml.xmlAddParams(xmlScanWindow, scanWindow)
                  xmlScanWindowList.append(xmlScanWindow)
              xmlScan.append(xmlScanWindowList)
  
          xmlScanList.append(xmlScan)
      return xmlScanList
docs: #TODO: docstring
  
      :params scanList: #TODO: docstring
      :params scanListParams: #TODO: docstring
  
      :returns: #TODO: docstring