I'm creating an XML DOM using python's Elementtree module, and it seems that it uses variables as nodes. My question is, how do I create unique varible names so that the nodes are persistent for the DOM if I'm adding records to the DOM in a loop. Sample code below.
someList =[1,2,3,4,5]
root = Element('root')
records = SubElement(root, 'records')
for idx, num in enumerate(someList):
record+idx = SubElement(records, 'record')
Hopefully this makes sense. Any help or advice would be greatly appreciated