This function parses the XML output of FileMaker.

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