Created
January 27, 2023 07:15
-
-
Save drajathasan/e0c2909bc0081a8ab03c67b4f446cd10 to your computer and use it in GitHub Desktop.
Consume OAI PMH result in SLiMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$modsxml = Client::get('https://slims-online/oai2.php?verb=ListRecords&metadataPrefix=oai_dc')->getContent(); | |
$xml = @new SimpleXMLElement($modsxml); | |
foreach ($xml->ListRecords->record as $record) { | |
$data = $record->metadata->children('oai_dc', 1)->dc->children('dc', 1); | |
dump($record->asXML(), $record->metadata->children('oai_dc', 1)->dc->children('dc', 1)); | |
break; | |
} | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment