#NEWLINE# def getiterator( self , tag = None ) : #NEWLINE# #INDENT# nodes = [ ] #NEWLINE# if ( tag == '*' ) : #NEWLINE# #INDENT# tag = None #NEWLINE# #UNINDENT# if ( ( tag is None ) or ( self . tag == tag ) ) : #NEWLINE# #INDENT# nodes . append ( self ) #NEWLINE# #UNINDENT# for node in self . _children : #NEWLINE# #INDENT# nodes . extend ( node . getiterator ( tag ) ) #NEWLINE# #UNINDENT# return nodes