fields = doctree.getElementsByTagName('field')
d = {}
for field in fields:
    field_name = field.getElementsByTagName('field_name')[0]
field_body = field.getElementsByTagName('field_body')[0]
d[field_name.firstChild.nodeValue] = ' '.join(c.firstChild.nodeValue for c in
    field_body.childNodes)
print(d)
Extract field list from reStructuredText