title: How to send XML data back to the browser using nodejs and express
body: <p>I"m trying to send back an XML error message to the browser in my nodejs / express application but the XML data doesn't get sent. </p>
  
  <pre><code>var xmlFile = '&lt;?xml version="1.0"?&gt;';
  xmlFile += '&lt;StatusCode&gt;ERROR&lt;/StatusCode&gt;';
  xmlFile += '&lt;StatusSubject&gt;ERROR&lt;/StatusSubject&gt;';
  xmlFile += '&lt;StatusMessage&gt;' + dataCheck.error + '&lt;/StatusMessage&gt;';
  security = null;
  res.set('Content-Type', 'text/xml');
  res.send(xmlFile);
  </code></pre>
  
  <p>Any idea why I don't get a response back? If I skip setting the content type I get a response but then my front-end jQuery tells me that the XML is not valid.</p>