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);
    }
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);
    }
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 ) ; }
Save the MARC record.
Save the MARC record .