def _XMLDumpKeyValue (self, key, value, indent=0, attrs_ptr=None,
                        was_array_typecode=None):
      t = type(value)
      if t==dict :
          
          if self.options_ & XML_DUMP_UNNATURAL_ORDER : # may want speed
              self._XMLDumpTable(key, value, indent, attrs_ptr, sortkeys=False)
          else : # Natural order (for predictability) 
              self._XMLDumpTable(key, value, indent, attrs_ptr, sortkeys=True)
              
      elif t==OrderedDict :
          
          if self.options_ & XML_DUMP_UNNATURAL_ORDER : # may still want sorted
              self._XMLDumpTable(key, value, indent, attrs_ptr, sortkeys=True)
          else : # Natural order of an odict is the order of the odict
              self._XMLDumpTable(key, value, indent, attrs_ptr, sortkeys=False)
              
      elif t==list or t==tuple :
          self._XMLDumpList(key, value, indent, was_array_typecode)
      elif t in array_types :
          self._XMLDumpPODList(key, value, indent, -1, False)
      else :
          self._XMLDumpPrimitive(key, value, indent, attrs_ptr, was_array_typecode)

  # Dump just the name and make sure it's well-formed tag name
  # (or attribute name): TODO: This may be too restrictive
dataset/ETHPy150Open redhat-imaging/imagefactory/imgfac/picklingtools/xmldumper.py/XMLDumper._XMLDumpKeyValue/original