Open
Description
I know I'm doing something wrong here, but I can't figure out what it is.
<recodList xmlns:xs="http://www.w3.org/2001/XMLSchema">
<script/>
<count>5487</count>
<record>
<Title>Le Havre</Title>
// https://sabre.io/xml/reading
$this->service->elementMap = [
'record' => function(Reader $reader) {
return keyValue($reader, 'recodList');
},
'recodList' => function(Reader $reader) {
return repeatingElements($reader, 'record');
},
];
I know the namespaces can be removed by declaring them in the call, but there's no namespace, besides the default. I've tried using that, and using {}, but I can't seem to get rid of the brackets in the key names.
array:24 [▼
"{}Title" => "Le Havre"
"{}Description" => null
Thanks again for this library, I struggle with parsing XML, but this has made it much easier. It's really quite remarkable.
Metadata
Metadata
Assignees
Labels
No labels