public function loadCodesXml(string $codesXml): array
    {
        $codesXmlString = \file_get_contents($codesXml);
        $codesXml = new \SimpleXMLIterator($codesXmlString);
        unset($codesXmlString);
        $codes = [];
        /* @var \SimpleXmlIterator $codeCollection */
        foreach ($codesXml as $codeCollection) {
            $id = (string)$codeCollection->attributes()->id;
            $codes[$id] = [];
            /*  @var \SimpleXmlIterator $codeNode */
            foreach ($codeCollection as $codeNode) {
                $codeAttributes = $codeNode->attributes();
                $code = (string)$codeAttributes->id;
                $codes[$id][$code] = (string)$codeAttributes->desc;
            }
        }

        return $codes;
    }
public function loadCodesXml(string $codesXml): array
    {
        $codesXmlString = \file_get_contents($codesXml);
        $codesXml = new \SimpleXMLIterator($codesXmlString);
        unset($codesXmlString);
        $codes = [];
        /* @var \SimpleXmlIterator $codeCollection */
        foreach ($codesXml as $codeCollection) {
            $id = (string)$codeCollection->attributes()->id;
            $codes[$id] = [];
            /*  @var \SimpleXmlIterator $codeNode */
            foreach ($codeCollection as $codeNode) {
                $codeAttributes = $codeNode->attributes();
                $code = (string)$codeAttributes->id;
                $codes[$id][$code] = (string)$codeAttributes->desc;
            }
        }

        return $codes;
    }
public function loadCodesXml ( string $ codesXml ) : array { $ codesXmlString = \ file_get_contents ( $ codesXml ) ; $ codesXml = new \ SimpleXMLIterator ( $ codesXmlString ) ; unset ( $ codesXmlString ) ; $ codes = [ ] ; /* @var \SimpleXmlIterator $codeCollection */ foreach ( $ codesXml as $ codeCollection ) { $ id = ( string ) $ codeCollection -> attributes ( ) -> id ; $ codes [ $ id ] = [ ] ; /*  @var \SimpleXmlIterator $codeNode */ foreach ( $ codeCollection as $ codeNode ) { $ codeAttributes = $ codeNode -> attributes ( ) ; $ code = ( string ) $ codeAttributes -> id ; $ codes [ $ id ] [ $ code ] = ( string ) $ codeAttributes -> desc ; } } return $ codes ; }
get all data element codes

@param string $codesXml

@return array
get all data element codes