def buildNode(self,root):
       ''' just to retrieve node(tag) name and it's content '''
       rootName = root.nodeName.strip()
       size = len(root.childNodes)
       if size == 0:
          value = self.getAttribute(root,'value')
          if value: return rootName,self.fromStringToType(value)
          else:     return rootName,None  
       else:
          if size ==1:
             child = root.childNodes[0]
             if child.nodeType == Node.TEXT_NODE: 
                value = child.nodeValue.strip() 
                if len(value)==0: return rootName,None
                else: 
                   return rootName,self.fromStringToType(value)
             else:
                internal = self.buildNode(child)
                return internal
          else:
              size = self.nodecount(root)
              if (size ==1):                                #just empty wrapper
                  for kid in root.childNodes:
                      if kid.nodeType ==  Node.ELEMENT_NODE:
                          internal = self.buildNode(kid)
                          return internal
              items = list()
              names = list()
              for kid in root.childNodes:
                 item = self.buildNode(kid)
                 if item[1] != None:
                    items.append(item[1])
                    name = item[0]
                    if name.find(':') !=-1 :
                       name = name.replace(':','_')
                    if iskeyword(name):
                       name = name[:1].upper()+ name[1:]
                    if not name in names:
                       names.append(name)
              return self.transform(rootName, names,items)
 just to retrieve node(tag) name and it's content 
recipes/Python/578032_XML_Pythobjectnext_generatireal_life_example/recipe-578032.py