#NEWLINE# def findNode( self , name , index = 0 , root = None ) : #NEWLINE# #INDENT# ' return the toplevel node with the provided name (if there are more, choose the\n        index corresponding one). ' #NEWLINE# if ( root == None ) : #NEWLINE# #INDENT# root = self . root #NEWLINE# #UNINDENT# for n in root . childNodes : #NEWLINE# #INDENT# if ( n . nodeName == name ) : #NEWLINE# #INDENT# if ( index == 0 ) : #NEWLINE# #INDENT# return n #NEWLINE# #UNINDENT# index -= 1 #NEWLINE# #UNINDENT# #UNINDENT# return None