src/Helpers/XMLParser.php
function buildtag($thisvals, $vals, &$i, $type)
    {

        if (isset($thisvals['attributes'])) {
            $tag['ATTRIBUTES'] = $thisvals['attributes'];
        }

        // complete tag, just return it for storage in array
        if ($type === 'complete') {
            $tag['VALUE'] = $thisvals['value'];
        } else {
            // open tag, recurse
            $tag = array_merge((array) $tag, (array) $this->getchildren($vals, $i));
        }
        return $tag;
    }
function buildtag($thisvals, $vals, &$i, $type)
    {

        if (isset($thisvals['attributes'])) {
            $tag['ATTRIBUTES'] = $thisvals['attributes'];
        }

        // complete tag, just return it for storage in array
        if ($type === 'complete') {
            $tag['VALUE'] = $thisvals['value'];
        } else {
            // open tag, recurse
            $tag = array_merge((array) $tag, (array) $this->getchildren($vals, $i));
        }
        return $tag;
    }
internal function: build a node of the tree