How do I output XML schema? I have set the REST server with the Services module. 

Also I've installed the Services Views module, created a new view that outputs the desired fields into XML.

That's working fine.

How can I add XML schema to that output, so the XML will look like:

&lt;?xml version="1.0"?&gt;
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
.....
You'll need to hook into the rest server module's formatters. This is untested but I think it'll work:

function MYMODULE_rest_server_response_formatters_alter(&amp;$formatters) {
  $formatters['xml']['formatter class'] = 'MyServicesXMLFormatter';
}

...

class MyServicesXMLFormatter extends ServicesXMLFormatter {

  public function render($data) {
    // This is the default code from ServicesXMLFormatter::render(), 
    // manipulate this to add your schema and return the saved doc as normal
    $doc = new DOMDocument('1.0', 'utf-8'); 
    $root = $doc-&gt;createElement('result'); 
    $doc-&gt;appendChild($root); 
    $this-&gt;xml_recursive($doc, $root, $data); 
    return $doc-&gt;saveXML();
  }

}