xmlFile = minidom.parse(FILE_PATH)
for script in SCRIPTS:
    newScript = xmlFile.createElement('script')
newScript.setAttribute('name', script.name)
newScript.setAttribute('action', script.action)
newScriptText = xmlFile.createTextNode(script.description)
newScript.appendChild(newScriptText)
xmlFile.childNodes[0].appendChild(newScript)
print(xmlFile.toprettyxml())
добавить элемент с атрибутами в minidom python