docs: def endElement(self, name):
          """ End current xml element, parse and add to to parent node. """
          if self.current:
              # we have nested elements
              obj = self.current
          else:
              # text only node
              text = ''.join(self.chardata).strip()
              obj = self._parse_node_data(text)
          newcurrent, self.chardata = self.stack.pop()
          self.current = self._element_to_node(newcurrent, name, obj)