code: def text_iter(self, context):
          
          for _event, elem in context:
              if not self.debug:
                  yield ExportXMLDocumentGraph(elem, name=elem.attrib[add_ns('id')])
              else:
                  yield elem
              # removes element (and references to it) from memory after processing it
              elem.clear()
              while elem.getprevious() is not None:
                  del elem.getparent()[0]
          del context
docs: Iterates over all the elements in an iterparse context
          (here: <text> elements) and yields an ExportXMLDocumentGraph instance
          for each of them. For efficiency, the elements are removed from the
          DOM / main memory after processing them.
  
          If ``self.debug`` is set to ``True`` (in the ``__init__`` method),
          this method will yield <text> elements, which can be used to construct
          ``ExportXMLDocumentGraph``s manually.