'Yield all children of element (and their children - recursively)
in dictionary form.
:param  element:    an XML ``Element``
:param  max_depth:  the number of generations of descendents to return'

def get_children(self, element, max_depth=None):

    if ((not isinstance(max_depth, int)) or (max_depth >= 1)):
        for child in element:
            child_data = self.element_as_dict(child)
            next_depth = ((max_depth - 1) if isinstance(max_depth, int) else None)
            grand_children = list(self.get_children(child, next_depth))
            if grand_children:
                child_data['children'] = grand_children
            (yield child_data)
