title: How can I respond in XML using ExpressJS?
body: <p>I have a simple code that gives a JSON response for a specific route. Here's my current code:</p>
  
  <pre><code>var express = require('express')
    , async = require('async')
    , http = require('http')
    , mysql = require('mysql');
  
  var app = express();
  
  var connection = mysql.createConnection({
      host: 'localhost',
      user: '****',
      password: "****",
      database: 'restaurants'
  });
  
  connection.connect();
  
  // all environments
  app.set('port', process.env.PORT || 1235);
  app.use(express.static(__dirname + '/public/images'));
  
  
  app.get('/DescriptionSortedRating/',function(request,response){
      var name_of_restaurants;
  
      async.series( [
          // Get the first table contents
          function ( callback ) {
              connection.query('SELECT * FROM restaurants ORDER BY restaurantRATING', function(err, rows, fields)
                  {
                          console.log('Connection result error '+err);
                          name_of_restaurants = rows;
                          callback();
                  });
  
   }
     // Send the response
  ], function ( error, results ) {
      response.json({
          'restaurants' : name_of_restaurants
      });
  } );
  
  } );
  
  
  
  http.createServer(app).listen(app.get('port'), function(){
    console.log('Express server listening on port ' + app.get('port'));
  });
  </code></pre>
  
  <p>How can I make an XML response equivalent to the JSON above?</p>