next(); * * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * * @param Reader $reader * @return mixed */ static function xmlDeserialize(Reader $reader) { $result = [ 'contentType' => $reader->getAttribute('content-type') ?: 'text/vcard', 'version' => $reader->getAttribute('version') ?: '3.0', ]; $elems = (array)$reader->parseInnerTree(); $result['addressDataProperties'] = array_map(function($element) { return $element['attributes']['name']; }, $elems); return $result; } }