original_string: public function save()
      {
          // If initialized from an SRU record, we need to fetch the
          // remaining parts of the Bib record.
          $this->init();
  
          // Inject the MARC record
          $marcXml = new QuiteSimpleXMLElement($this->_marc->toXML('UTF-8', false, false));
          $this->data->first('record')->replace($marcXml);
  
          // Serialize
          $newData = $this->data->asXML();
  
          // Alma doesn't like namespaces
          $newData = str_replace(' xmlns="http://www.loc.gov/MARC21/slim"', '', $newData);
  
          return $this->client->putXML($this->url(), $newData);
      }
code: public function save()
      {
          // If initialized from an SRU record, we need to fetch the
          // remaining parts of the Bib record.
          $this->init();
  
          // Inject the MARC record
          $marcXml = new QuiteSimpleXMLElement($this->_marc->toXML('UTF-8', false, false));
          $this->data->first('record')->replace($marcXml);
  
          // Serialize
          $newData = $this->data->asXML();
  
          // Alma doesn't like namespaces
          $newData = str_replace(' xmlns="http://www.loc.gov/MARC21/slim"', '', $newData);
  
          return $this->client->putXML($this->url(), $newData);
      }
code_tokens: public function save ( ) { // If initialized from an SRU record, we need to fetch the // remaining parts of the Bib record. $ this -> init ( ) ; // Inject the MARC record $ marcXml = new QuiteSimpleXMLElement ( $ this -> _marc -> toXML ( 'UTF-8' , false , false ) ) ; $ this -> data -> first ( 'record' ) -> replace ( $ marcXml ) ; // Serialize $ newData = $ this -> data -> asXML ( ) ; // Alma doesn't like namespaces $ newData = str_replace ( ' xmlns="http://www.loc.gov/MARC21/slim"' , '' , $ newData ) ; return $ this -> client -> putXML ( $ this -> url ( ) , $ newData ) ; }
docstring: Save the MARC record.
docstring_tokens: Save the MARC record .