code: def startElement(self, name, attrs):
          
          self.stack.append((self.current, self.chardata))
          self.current = {}
          self.chardata = []
docs: Initialize new node and store current node into stack.