src/Parser.php
private function parseElementNodes($children, $parentName = null)
    {
        $result = [];

        foreach ($children as $child) {
            $prefix = $child->prefix ?: null;
            $oname  = $this->normalizeKey($child->nodeName);
            $name   = $this->prefixKey($oname, $prefix);

            if (isset($result[$name])) {
                $this->parseSetResultNodes($child, $name, $result);
                continue;
            }

            $this->parseUnsetResultNodes($child, $name, $oname, $parentName, $result, $prefix);
        }

        return $result;
    }
private function parseElementNodes($children, $parentName = null)
    {
        $result = [];

        foreach ($children as $child) {
            $prefix = $child->prefix ?: null;
            $oname  = $this->normalizeKey($child->nodeName);
            $name   = $this->prefixKey($oname, $prefix);

            if (isset($result[$name])) {
                $this->parseSetResultNodes($child, $name, $result);
                continue;
            }

            $this->parseUnsetResultNodes($child, $name, $oname, $parentName, $result, $prefix);
        }

        return $result;
    }
private function parseElementNodes ( $ children , $ parentName = null ) { $ result = [ ] ; foreach ( $ children as $ child ) { $ prefix = $ child -> prefix ? : null ; $ oname = $ this -> normalizeKey ( $ child -> nodeName ) ; $ name = $ this -> prefixKey ( $ oname , $ prefix ) ; if ( isset ( $ result [ $ name ] ) ) { $ this -> parseSetResultNodes ( $ child , $ name , $ result ) ; continue ; } $ this -> parseUnsetResultNodes ( $ child , $ name , $ oname , $ parentName , $ result , $ prefix ) ; } return $ result ; }
Parse a nodelist into a array

@param \DOMNodeList|array $children elements to parse
@param string $parentName           node name of the parent element

@return array
Parse a nodelist into a array