Sto utilizzando il modulo xml.etree.ElementTree
per creare un documento XML con Python 3.1 da un altro documento strutturato.Indice elemento ElementTree cercare
Quale funzione ElementTree posso utilizzare per restituire l'indice di un sottoelemento esistente?
Grazie, esattamente quello che stavo cercando. – John
Solo un heads up - list (root) .index (body) è ora il modo corretto per farlo. getchildren() è stato deprecato – aaaaaa