for target in root.xpath('.//Department/orgID[text()="126"]'):
    d = {dept.find('name').text: int(dept.find('orgID').text) for dept in
        target.xpath('ancestor-or-self::Department')}
print(d)
get all parents of xml node using python