Try replacing
XMLElement xml = new XMLElement(xmlResponse);
with
XMLElement xml = XMLElement.parse(xmlResponse);
XMLElement xml = new XMLElement(xmlResponse);
with
XMLElement xml = XMLElement.parse(xmlResponse);