Skip to content

Commit 7e068fb

Browse files
committed
Fix missing namespace in Alma records
1 parent c5071f2 commit 7e068fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Response.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ class Response implements ResponseInterface
112112
*/
113113
public function __construct($text, &$client = null)
114114
{
115+
116+
// Fix missing namespace in Alma records:
117+
$text = str_replace('<record xmlns="">', '<record xmlns="http://www.loc.gov/MARC21/slim">', $text);
118+
115119
$this->rawResponse = $text;
116120

117121
// Throws Danmichaelo\QuiteSimpleXMLElement\InvalidXMLException on invalid xml

0 commit comments

Comments
 (0)