You are here

function services_xml_output in Services 6.2

Same name and namespace in other branches
  1. 5 services.module \services_xml_output()
  2. 6 services.module \services_xml_output()
  3. 7 services.module \services_xml_output()

Helper function for sending XML output.

This method outputs an XML processing instruction and the necessary headers and then exits.

Parameters

$xml: The XML to be output.

1 call to services_xml_output()
services_crossdomain_xml in ./services.module
Callback for crossdomain.xml

File

./services.module, line 181
Provides a generic but powerful API for exposing web services.

Code

function services_xml_output($xml) {
  $xml = '<?xml version="1.0"?>' . "\n" . $xml;
  header('Connection: close');
  header('Content-Length: ' . drupal_strlen($xml));
  header('Content-Type: text/xml');
  header('Date: ' . date('r'));
  echo $xml;
  exit;
}