import xmltodict

with open('path/to/file.xml') as fd:
    doc = xmltodict.parse(fd.read())


    doc['mydocument']['@has'] # == u'an attribute'
    doc['mydocument']['and']['many'] # == [u'elements', u'more elements']
    doc['mydocument']['plus']['@a'] # == u'complex'
    doc['mydocument']['plus']['#text'] # == u'element as well'

Create xmltodict_implementation.py