Added SimpleXML check to doCall function