protected function readXmlNodes(\SimpleXMLElement $element): array
    {
        $arrayElements = [];
        foreach ($element as $name => $node) {
            if ($name == "defaults") {
                continue;
            }
            $arrayElement = [];
            $arrayElement["type"] = $name;
            $arrayElement["attributes"] = $this->readAttributesArray($node);
            $details = $this->readXmlNodes($node);
            if (!empty($details)) {
                $arrayElement["details"] = $details;
            }
            $arrayElements[] = $arrayElement;
        }

        return $arrayElements;
    }
protected function readXmlNodes(\SimpleXMLElement $element): array
    {
        $arrayElements = [];
        foreach ($element as $name => $node) {
            if ($name == "defaults") {
                continue;
            }
            $arrayElement = [];
            $arrayElement["type"] = $name;
            $arrayElement["attributes"] = $this->readAttributesArray($node);
            $details = $this->readXmlNodes($node);
            if (!empty($details)) {
                $arrayElement["details"] = $details;
            }
            $arrayElements[] = $arrayElement;
        }

        return $arrayElements;
    }
protected function readXmlNodes ( \ SimpleXMLElement $ element ) : array { $ arrayElements = [ ] ; foreach ( $ element as $ name => $ node ) { if ( $ name == "defaults" ) { continue ; } $ arrayElement = [ ] ; $ arrayElement [ "type" ] = $ name ; $ arrayElement [ "attributes" ] = $ this -> readAttributesArray ( $ node ) ; $ details = $ this -> readXmlNodes ( $ node ) ; if ( ! empty ( $ details ) ) { $ arrayElement [ "details" ] = $ details ; } $ arrayElements [ ] = $ arrayElement ; } return $ arrayElements ; }
read message segments and groups

@param \SimpleXMLElement $element

@return array
read message segments and groups