Python: Get value with xmltodict
<p>I have an XML-file that looks like this:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;session id="2934" name="Valves" docVersion="5.0.1"&gt;
    &lt;docInfo&gt;
        &lt;field name="Employee" isMandotory="True"&gt;Jake Roberts&lt;/field&gt;
        &lt;field name="Section" isOpen="True" isMandotory="False"&gt;5&lt;/field&gt;
        &lt;field name="Location" isOpen="True" isMandotory="False"&gt;Munchen&lt;/field&gt;
    &lt;/docInfo&gt;
&lt;/session&gt;
</code></pre>

<p>Using xmltodict I want to get the Employee in a string. It is probably quite simple but I can't seem to figure it out.</p>

<p>Here's my code:</p>

<pre><code>#!/usr/bin/python
# -*- coding: utf-8 -*-


import sys
import xmltodict


with open('valves.xml') as fd:
    doc = xmltodict.parse(fd.read())


print "ID          : %s" % doc['session']['@id']
print "Name        : %s" % doc['session']['@name']
print "Doc Version : %s" % doc['session']['@docVersion']


print "Employee    : %s" % doc['session']['docInfo']['field']


sys.exit(0)
</code></pre>

<p>With this, I do get all fields in a list, but probably with xmltodict every individual field attribute or element is accessible as a key-value.
How can I access the value "Jake Roberts" like I access the value of docVersion for example?</p>