Can we change the schema in services module? I am new to Drupal services; I have the below XML format, in which I need to expose nodes as services.

Can I do this using the Services module?

    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ngd:mediafile xmlns:ngd="http://www.xyzy.com/ngdine"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://www.xyzy.com/ngdine mediafile.xsd"&gt;
  &lt;ngd:description&gt;
    &lt;![CDATA[This is the description]]&gt;
  &lt;/ngd:description&gt;
  &lt;ngd:mediatype id="1"/&gt;
  &lt;ngd:internal&gt;Aalborg city.JPG&lt;/ngd:internal&gt;
&lt;/ngd:mediafile&gt;


Can I change the schema?
If you need to expose the output that way, THeres 2 ways you can do it. You can alter the response before it gets sent as a payload, or you can write your own Response Format.

Both should do what you need, but its merely a preference.

/**
 * Triggered when the REST server request a list of supported response formats.
 *
 * @param array $formatters
 *  An associative array of formatter info arrays keyed by type extension. The
 *  formatter info specifies an array of 'mime types' that corresponds to the
 *  output format; a 'view' class that is a subclass of RESTServerView; and
 *  'view arguments' that should be passed to the view when it is created;
 *  a 'model' can also be specified which the controller then must declare
 *  support for to be able to serve data in that format.
 * @return void
 */
 function hook_rest_server_response_formatters_alter(&amp;$formatters) {
   /*
    * Sample modifications of the formatters array. Both yaml and
    * rss are formats that already are supported, so the changes are
    * nonsensical but illustrates the proper use of this hook.
    */

    // Add a Yaml response format.
    $formatters['yaml'] = array(
      'mime types' =&gt; array('text/plain', 'application/x-yaml', 'text/yaml'),
      'view' =&gt; 'RESTServerViewBuiltIn',
      'view arguments' =&gt; array('format' =&gt; 'yaml'),
    );

    // Add a Rss response format.
    $formatters['rss'] = array(
     'model' =&gt; 'ResourceFeedModel',
     'mime types' =&gt; array('text/xml'),
     'view' =&gt; 'RssFormatView',
    );
 }


The altering of the response is, function HOOK_services_request_postprocess_alter