Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::ParserSupport::EventGenerator::endElement (   self,
  name 
)

Send the information to the consumer.

Once we've got the end element we've collected up all of the
character information we need, and we need to send this on to
the consumer to do something with it.

We have a delay of one tag on doing this, so that we can collect
all of the info from multiple calls to the same element at once.

Definition at line 229 of file ParserSupport.py.

00229                                   :
            """Send the information to the consumer.

            Once we've got the end element we've collected up all of the
            character information we need, and we need to send this on to
            the consumer to do something with it.

            We have a delay of one tag on doing this, so that we can collect
            all of the info from multiple calls to the same element at once.
            """
            # only deal with the tag if it is something we are
            # interested in and potentially have information for
            if self._collect_characters:
                # add all of the information collected inside this tag
                self.info[name].append("".join(self._cur_content))
                # reset our information and flags
                self._cur_content = []
                self._collect_characters = 0
                
                # if we are at a new tag, pass on the info from the last tag
                if self._previous_tag and self._previous_tag != name:
                    self._make_callback(self._previous_tag)

                # set this tag as the next to be passed
                self._previous_tag = name

        def _make_callback(self, name):


Generated by  Doxygen 1.6.0   Back to index