parameters: (elem, default=None)
return_statement: return elem.get('name', default)
docstring: Get the name associated with an element, either a name child or name attribute.
docstring_summary: Get the name associated with an element, either a name child or name attribute.
docstring_tokens: Get the name associated with an element either a name child or name attribute .
function: def getElemName(elem, default=None):
      """Get the name associated with an element, either a name child or name attribute."""
      name_elem = elem.find('name')
      if name_elem is not None:
          return name_elem.text
      # Fallback if there is no child.
      return elem.get('name', default)
function_tokens: def getElemName ( elem , default = None ) : name_elem = elem . find ( 'name' ) if name_elem is not None : return name_elem . text # Fallback if there is no child. return elem . get ( 'name' , default )