I've installed the ElementTree library from here: http://effbot.org/zone/element.htm in python 2.7.
I've parsed in an xml file:
tree_a=parse('/home/user/cookies.xml')
The question that emerges now, and where I coudln't extract the information from the documentation of effbot ElementTree:
How can I access a node from the xml-tree via calling it by its attribute value?
something like
tree_a.getNode(my_attribute,my_attribute_value)
in an example:
tree_a.getNode(cookie_diameter, 12)
so that query would return the node from the xml-tree, that has as 'cookie_diameter' attribute the value 12
Does a built-in function exist ?
Best regards
Daniyal
ElementTreeis a part of Python stdlib since Python 2.5.