<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getElements(self,name=''):
		'Get a list of child elements'
		#If no tag name is specified, return the all children
		if not name:
			return self.children
		else:
			# else return only those children with a matching tag name
			elements = []
			for element in self.children:
				if element.name == name:
					elements.append(element)
			return elements