parameters: (element)
return_statement: return ret[tagName]
docstring: Creates a dictionary from the documentTree obtained from a binding Element.
      :param element:
      :return:
docstring_summary: Creates a dictionary from the documentTree obtained from a binding Element.
      :param element:
      :return:
docstring_tokens: Creates a dictionary from the documentTree obtained from a binding Element . : param element : : return :
function: def child2dict(element):
      '''
      Creates a dictionary from the documentTree obtained from a binding Element.
      :param element:
      :return:
      '''
  
      xml = tostring(element)
      ret = xmltodict.parse(xml, strip_whitespace=False)
  
      # process dict, do ad-hoc fixes
      fix_dict(ret, element.tag)
  
      # get the tag name and remove the ns attribute if present
      if "}" in element.tag:
          tagName = element.tag.split('}')[1]
          del ret[tagName]['@xmlns']
      else:
          tagName = element.tag
  
      # Reemplace no-dictionary with empty dictionary
      if ret[tagName] == None:
          ret[tagName] = OrderedDict()
  
      # Replace 'None' values returned by xmltodict by ""
      none2emptystr(ret)
  
      # return the contents dictionary, but save a reference
      ret[tagName]._root = ret
      return ret[tagName]
function_tokens: def child2dict ( element ) : xml = tostring ( element ) ret = xmltodict . parse ( xml , strip_whitespace = False ) # process dict, do ad-hoc fixes fix_dict ( ret , element . tag ) # get the tag name and remove the ns attribute if present if "}" in element . tag : tagName = element . tag . split ( '}' ) [ 1 ] del ret [ tagName ] [ '@xmlns' ] else : tagName = element . tag # Reemplace no-dictionary with empty dictionary if ret [ tagName ] == None : ret [ tagName ] = OrderedDict ( ) # Replace 'None' values returned by xmltodict by "" none2emptystr ( ret ) # return the contents dictionary, but save a reference ret [ tagName ] . _root = ret return ret [ tagName ]