You are here

public function RestWSFormatXML::unserialize in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.formats.inc \RestWSFormatXML::unserialize()
1 call to RestWSFormatXML::unserialize()
RestWSFormatXML::createResource in ./restws.formats.inc
Creates a new resource.

File

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

Class

RestWSFormatXML
A formatter for XML.

Code

public function unserialize($properties, $data) {

  // Disable XML external entity expansion for security reasons.
  libxml_disable_entity_loader(TRUE);
  $xml = simplexml_load_string($data);
  return $this
    ->xmlToArray($properties, $xml);
}