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

def StartElement(self,name,attributes):
		'SAX start element even handler'
		# Instantiate an Element object
		element = Element(name.encode(),attributes)
		
		# Push element onto the stack and make it a child of parent
		if len(self.nodeStack) > 0:
			parent = self.nodeStack[-1]
			parent.AddChild(element)
		else:
			self.root = element
		self.nodeStack.append(element)