I have an XML-file that looks like this:
&l
What you are getting is a list of fields where every field is represented by a dict()
. Explore this dict (e.g. in Python interactive shell) to narrow down how to get to the value you want.
>>> doc["session"]["docInfo"]["field"][0]
OrderedDict([(u'@name', u'Employee'), (u'@isMandotory', u'True'), ('#text', u'Jake Roberts')])
In order to get to the element value add ["#text"]
to the end of the line in the snippet above.