I'm using python to create xml files, and I need to create the attribute xml:id
how can I do this?
I'm using python to create xml files, and I need to create the attribute xml:id
how can I do this?
Try using the xml.dom.minidom module
from xml.dom import minidom
doc = minidom.Document()
ele = doc.createElement("element")
doc.appendChild(ele)
ele.attributes['xml:id']= "something"
print (ele.toxml())