Symfony Config XML utils - convert DOMElement to array

Code
<?php

use Symfony\Component\Config\Util\XmlUtils;

$file __DIR__.'/city.xml';
echo 
'file content:';
dump(file_get_contents($file));

/* @var $dom \DOMDocument */
$dom XmlUtils::loadFile($file);
$city $dom->getElementsByTagName('City')
    ->
item(0);

echo 
get_class($city);

dump(
    
XmlUtils::convertDomElementToArray($city)
);
Result
file content:
^ """
<?xml version="1.0" encoding="UTF-8"?>\n
<List>\n
    <City>\n
        <CityId>1</CityId>\n
        <Name>South Park</Name>\n
    </City>\n
    <City>\n
        <CityId>2</CityId>\n
        <Name>Springfield</Name>\n
    </City>\n
    <City>\n
        <CityId>3</CityId>\n
        <Name>Quahog</Name>\n
    </City>\n
</List>
"""
DOMElement
^ array:2 [
  "CityId" => 1
  "Name" => "South Park"
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8