(self, name, nsprefix=None, inclusivePop=True)
return most_recently_popped
Pops the tag stack up to and including the most recent
        instance of the given tag. If inclusivePop is false, pops the tag
        stack up to but *not* including the most recent instqance of
        the given tag.
Pops the tag stack up to and including the most recent
        instance of the given tag. If inclusivePop is false, pops the tag
        stack up to but *not* including the most recent instqance of
        the given tag.
Pops the tag stack up to and including the most recent instance of the given tag . If inclusivePop is false pops the tag stack up to but * not * including the most recent instqance of the given tag .
def _popToTag(self, name, nsprefix=None, inclusivePop=True):
        """Pops the tag stack up to and including the most recent
        instance of the given tag. If inclusivePop is false, pops the tag
        stack up to but *not* including the most recent instqance of
        the given tag."""
        #print "Popping to %s" % name
        if name == self.ROOT_TAG_NAME:
            # The BeautifulSoup object itself can never be popped.
            return

        most_recently_popped = None

        stack_size = len(self.tagStack)
        for i in range(stack_size - 1, 0, -1):
            t = self.tagStack[i]
            if (name == t.name and nsprefix == t.prefix):
                if inclusivePop:
                    most_recently_popped = self.popTag()
                break
            most_recently_popped = self.popTag()

        return most_recently_popped
def _popToTag ( self , name , nsprefix = None , inclusivePop = True ) : #print "Popping to %s" % name if name == self . ROOT_TAG_NAME : # The BeautifulSoup object itself can never be popped. return most_recently_popped = None stack_size = len ( self . tagStack ) for i in range ( stack_size - 1 , 0 , - 1 ) : t = self . tagStack [ i ] if ( name == t . name and nsprefix == t . prefix ) : if inclusivePop : most_recently_popped = self . popTag ( ) break most_recently_popped = self . popTag ( ) return most_recently_popped