#NEWLINE# def FindChildren( self , tag = None , namespace = None ) : #NEWLINE# #INDENT# 'Searches child nodes for objects with the desired tag/namespace.\n\n    Returns a list of extension elements within this object whose tag\n    and/or namespace match those passed in. To find all children in\n    a particular namespace, specify the namespace but not the tag name.\n    If you specify only the tag, the result list may contain extension\n    elements in multiple namespaces.\n\n    Args:\n      tag: str (optional) The desired tag\n      namespace: str (optional) The desired namespace\n\n    Returns:\n      A list of elements whose tag and/or namespace match the parameters\n      values\n    ' #NEWLINE# results = [ ] #NEWLINE# if ( tag and namespace ) : #NEWLINE# #INDENT# for element in self . children : #NEWLINE# #INDENT# if ( ( element . tag == tag ) and ( element . namespace == namespace ) ) : #NEWLINE# #INDENT# results . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( tag and ( not namespace ) ) : #NEWLINE# #INDENT# for element in self . children : #NEWLINE# #INDENT# if ( namespace . tag == tag ) : #NEWLINE# #INDENT# results . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( namespace and ( not tag ) ) : #NEWLINE# #INDENT# for element in self . children : #NEWLINE# #INDENT# if ( element . namespace == namespace ) : #NEWLINE# #INDENT# results . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for element in self . children : #NEWLINE# #INDENT# results . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return results