You are here

public function RestWSFormatXML::serialize in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.formats.inc \RestWSFormatXML::serialize()

File

./restws.formats.inc, line 571
RESTful web services module formats.

Class

RestWSFormatXML
A formatter for XML.

Code

public function serialize($data) {

  // Return an empty XML document.
  $xml = new DOMDocument('1.0', 'utf-8');
  return $xml
    ->saveXML();
}