          
          if len(children) == 0:
              return self._type_convert(element.text)
          else:
              if element.tag == "resource":
                  data = []
                  for child in children:
                      data.append(self._xml_convert(child))
              else:    
                  if children[0].tag == "resource":
 
</s> remove                 if children[0].tag == "resource":
                    data = []
                    for child in children:
                       data.append(self._xml_convert(child))                       
                else:    
                    data = {}
                    for child in children:
                       data[child.tag] = self._xml_convert(child)
 </s> add                 data = {}
                for child in children:
                    data[child.tag] = self._xml_convert(child) </s> remove         data = {}
 </s> add 
            # if the fist child tag is list-item means all children are list-item
            if children[0].tag == "list-item":
          
          if len(children) == 0:
              return self._type_convert(element.text)
          else:
            # if the fist child tag is list-item means all children are list-item
            if children[0].tag == "list-item":
                  data = []
                  for child in children:
                      data.append(self._xml_convert(child))
              else:    
                  if children[0].tag == "resource":
keep keep keep keep replace keep keep keep keep keep
 correct complex data xml parsing 
djangorestframework/parsers.py