Ethernet Shield generating XML page

Hello,

I’m trying to get my Arduino UNO with an ethernet shield to generate XML code for current temperature settings and such. I’ve gotten chrome to believe it’s getting XML data through the header, but it’s not actually showing anything. I figure there most be something I’m missing between the header data and the XML data. Does anyone have any idea?

Here’s the relevant code snippet:

// Print HTTP Header
          client.println("HTTP/1.1 200 OK");
          client.println("Server: Arduino");
          client.println("Access-Control-Allow-Origin: *");
          client.println("Connection: Keep-Alive");
          client.println("Content-Type: text/xml");

          // Print XML content
          client.print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
          //client.print("<!-- XML output by Ms. Carson -->");
          client.print("<envdata>");
          // Output temp reading.
          int sensorReading = analogRead(TempChannel);
          client.print("<curtemp>");
          client.print(((((sensorReading * 0.004882814)- 0.5) * 100.0) * (9.0/5.0)) + 32);
          client.print("</curtemp>");
          client.print("<fanstat>");
          client.print(FanOn);
          etc., etc.,

I’ve checked the header response in Chrome and it all looks good, but none of the rest is coming through at all.

Thanks in advance!

If this is the last line of the header, then it needs a double cr/lf.

          client.println("Content-Type: text/xml\r\n");

WTF? I tried that before and it caused the page to not load at all, and when you suggest it and I try it again, it works!

(I probably didn’t do it right before).

THANKS A TON!