Python Minidom XML Query

Accolaaccutle

New Member
I'm trying to query this XML with lxml:\[code\]<lista_tareas> <tarea id="1" realizzato="False" data_limite="12/10/2012" priorita="1"> <description>XML TEST</description></tarea><tarea id="2" realizzato="False" data_limite="12/10/2012" priorita="1"> <description>XML TEST2</description></tarea>\[/code\]I wrote this code:\[code\]from lxml import etreedoc = etree.parse(file_path) root = etree.Element("lista_tareas")for x in root: z = x.Element("tarea") for y in z: element_text = y.Element("description").text print element_text\[/code\]It doesn't print anything, could you suggest me how to do?Thanks a lot!
 
Back
Top