Logo Search packages:      
Sourcecode: jaxml version File versions  Download package

def jaxml::_TAGGED_document::_pop (   self,
  name = None 
) [private]
Restore the latest pushed position.

   useful to get out of a block of nested tags
   
   name : can be used to restore a named position, not necessarily the latest.

Definition at line 657 of file jaxml.py.

                                  :
                """Restore the latest pushed position.

                   useful to get out of a block of nested tags
                   
                   name : can be used to restore a named position, not necessarily the latest.
                """
                if self.__pushed :
                        maxindex = len(self.__pushed) - 1
                        if name :
                                try :
                                        index = self.__pusheddict[name]
                                        del self.__pusheddict[name]
                                except KeyError :        
                                        raise KeyError, "jaxml named position %s doesn't exist" % name
                        else :
                                index = maxindex
                        while maxindex >= index :
                                pos, offset = self.__pushed.pop()
                                self.__position = pos + offset
                                self.__adjust_stack(offset) # we report the offset on previously saved tags
                                maxindex = maxindex - 1


Generated by  Doxygen 1.6.0   Back to index