for the xml
data1
data2
It seems you can get access to the parent from the child using version 1.3 of ElementTree (check http://effbot.org/zone/element-xpath.htm), by using xpath commands like child.find('../parent')
. But I think python ships with version 1.2 or something.
You should also check for lxml which is compatible with etree and has full Xpath support http://lxml.de/