'Dict getter method for NaElement.
Returns NaElement list if present,
text value in case no NaElement node
children or attribute value if present.'

def __getitem__(self, key):

    child = self.get_child_by_name(key)
    if child:
        if child.get_children():
            return child
        else:
            return child.get_content()
    elif self.has_attr(key):
        return self.get_attr(key)
    raise KeyError((_('No    element    by    given    name    %s.') % key))
