Trying to show data via function using custom related list - what's wrong with my formatting?

Trying to show data via function using custom related list - what's wrong with my formatting?

Hi,

Sent this in via live chat but haven't gotten a response yet, and wondering what I'm doing wrong.

I have this code: 

  1. string FreshdeskTickets(string email)
  2. {
  3. headerMap={ "Content-Type" : "application/xml", "Authorization" : "Basic XXXXX" };
  4. response = getUrl("https://XXXXX.freshdesk.com/helpdesk/tickets/user_ticket.xml?email=" + input.email,headerMap);
  5. ticketid = response.executeXPath("/helpdesk-tickets/helpdesk-ticket/display-id/text()");
  6. createdate = response.executeXPath("/helpdesk-tickets/helpdesk-ticket/created-at/text()");
  7. ticketsubject = response.executeXPath("/helpdesk-tickets/helpdesk-ticket/subject/text()");
  8. lastupdated = response.executeXPath("/helpdesk-tickets/helpdesk-ticket/updated-at/text()");
  9. weburl="https://edgeassessment.freshdesk.com/helpdesk/tickets/" + ticketid;
  10. items=weburl + "" + ticketid + "" + createdate + "" + ticketsubject + "" + lastupdated;
  11. return items;
  12. }
And in the script testing, it does show the data from the API call as coming in successfully. I just can't get it to show up in the related list itself (" Sorry, the related list cannot be displayed as there is some problem while processing your request.") , and I think it's a formatting issue on my part somewhere. I looked up from elsewhere the format, which should be something like <record><row no=0><FL name="item1">Item data</FL></row></record>, so then I tried another basic function that looks like this:

  1. string helloworld(string email)
  2. {
  3. return "<row no=\"0\"> <FL val=\"Name1\">value1</FL> <FL val=\"Name2\">value2</FL> <FL val=\"Name3\">value3</FL> <FL val=\"Name4\">value4</FL> <FL val=\"Name5\">value5</FL> </row> <row no=\"1\"> <FL val=\"Name1\">value1</FL> <FL val=\"Name2\">value2</FL> <FL val=\"Name3\">value3</FL> <FL val=\"Name4\">value4</FL> <FL val=\"Name5\">value5</FL> </row>";
  4. }
But same error. What am I doing wrong?