for script in SCRIPTS:
    newScript = xmlFile.createElement('script')
newScript.setAttribute('name', script.name)
newScript.setAttribute('action', script.action)
add element with attributes in minidom python