def _XMLDumpPODList (self, list_name, l, 
                       indent, inside_list_number, add_type):
      # tag = str(list_name)
      tag = list_name

      # Check to see if we want to dump this as a LIST or plain POD array
      if self.arrDisp_ == ARRAYDISPOSITION_AS_LIST :
          # This works works with array.array and Numeric.array because
          # the floating point typecodes are essentially the same,
          # and both support typecode and tolist
          was_array_typecode = l.typecode
          if callable(l.typecode) : was_array_typecode = l.typecode()
          # float types
          if not was_array_typecode in ['f','F','d','D'] : 
              was_array_typecode = None
          l = l.tolist()
          # Integer types
          if was_array_typecode == None :  
              l = [int(x) for x in l]
              
          self._XMLDumpList(list_name, l, indent, was_array_typecode)
          return

      # The attributes for an Array of POD will the Numeric type tag
      attrs = { }
      lookup_table = {'1':'s','b':'S', 's':'i','w':'I', 'i':'l','u':'L', 'l':'x', 'f':'f', 'd':'d', 'F':'F', 'D':'D' }
      bytetag = lookup_table[l.typecode()]
      if (self.options_ & XML_DUMP_POD_LIST_AS_XML_LIST) :
          attrs["type__"] = bytetag
      else :
          attrs["arraytype__"] = bytetag

      # There are two ways to dump Array data: either as one tag
      # with a list of numbers, or a tag for for every number.
      # Dumping array data with a tag for every number works better with 
      # other tools (spreasheet etc.), but if you annotate EVERY ELEMENT 
      # of a long list, the XML becomes much bigger and slow.

      # Dump array with a tag for EVERY element
      primitive_type = True
      temp = None
      inner_tag = tag
      if (self.options_ & XML_DUMP_POD_LIST_AS_XML_LIST) :
          # Rare case when POD array inside list
          if (inside_list_number!=-1) :
              inner_attrs = { }
              if inside_list_number==0 and add_type :
                  inner_attrs["type__"]="list"
              self._XMLDumpStartTag(tag, inner_attrs, indent, False)
              inner_tag = "list"+str(inside_list_number)+"__"
              indent += self.indentIncrement_
              
          if len(l)==0 :
              # Empty list
              self._XMLDumpStartTag(inner_tag, attrs, indent, primitive_type)
              self._XMLDumpEndTag(inner_tag, indent, primitive_type)
          else :
              # Non-empty list
              for ii in xrange(0, len(l)) :
                  self._XMLDumpStartTag(inner_tag, attrs, indent, primitive_type)
                  temp = pretty.NumericString_(bytetag, l[ii])       #repr(l[ii])  # so prints with full precision of Val for reals, etc.
                  self.os_.write(temp)
                  self._XMLDumpEndTag(inner_tag, indent, primitive_type)
                  
          # Rare case when POD array inside list
          if (inside_list_number!=-1) :
              indent -= self.indentIncrement_
              self._XMLDumpEndTag(tag, indent, False)
    
      # Dump as a list of numbers with just one tag: the tag, the list of data, 
      # then the end tag      
      else :
          if (inside_list_number==0 and add_type) : attrs["type__"]="list"
          self._XMLDumpStartTag(tag, attrs, indent, primitive_type)
          for ii in xrange(0, len(l)) :
              temp = pretty.NumericString_(bytetag, l[ii])       #repr(l[ii])  # so prints with full precision of Val for reals, etc. 
              self.os_.write(temp)
              if (ii<len(l)-1) : self.os_.write(",")
          # End
          self._XMLDumpEndTag(tag, indent, primitive_type)


  # Dump a table t
dataset/ETHPy150Open redhat-imaging/imagefactory/imgfac/picklingtools/xmldumper.py/XMLDumper._XMLDumpPODList/original