<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def doParseXMLData( self ):
 		 		"""This function parses the XML output of FileMaker."""


		parser = xml2obj.Xml2Obj()
		# Not valid document comming from FMServer
		if self.data[-6:] == '</COL>':
			self.data += '</ROW></RESULTSET></FMPXMLRESULT>'
		xobj = parser.ParseString( self.data )

		try:
			el = xobj.getElements( 'ERRORCODE')
			if el:
				self.errorcode = int( el[0].getData() )
			else:
				self.errorcode = int( xobj.getElements('error')[0].getAttribute('code') )
		except:
			FMErrorByNum( 954 )

		if self.errorcode != 0:
			FMErrorByNum( self.errorcode )

		return xobj