(self, name, inclusivePop=True)
return mostRecentTag
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, 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:
            return

        numPops = 0
        mostRecentTag = None
        for i in xrange(len(self.tagStack)-1, 0, -1):
            if name == self.tagStack[i].name:
                numPops = len(self.tagStack)-i
                break
        if not inclusivePop:
            numPops = numPops - 1

        for i in xrange(0, numPops):
            mostRecentTag = self.popTag()
        return mostRecentTag
def _popToTag ( self , name , inclusivePop = True ) : #print "Popping to %s" % name if name == self . ROOT_TAG_NAME : return numPops = 0 mostRecentTag = None for i in xrange ( len ( self . tagStack ) - 1 , 0 , - 1 ) : if name == self . tagStack [ i ] . name : numPops = len ( self . tagStack ) - i break if not inclusivePop : numPops = numPops - 1 for i in xrange ( 0 , numPops ) : mostRecentTag = self . popTag ( ) return mostRecentTag