protected function parseOutline(SimpleXMLElement $outlineXML)
    {
        $outline = [];
        foreach ($outlineXML->attributes() as $key => $value) {
            $outline[$key] = (string)$value;
        }
        // Bug fix for OPMLs witch contains `title` but not the required `text`
        if (empty($outline['text']) && isset($outline['title'])) {
            $outline['text'] = $outline['title'];
        }
        foreach ($outlineXML->children() as $key => $value) {
            // An outline may contain any number of outline children
            if ($key === 'outline') {
                $outline['@outlines'][] = $this->parseOutline($value);
            }
        }
        return $outline;
    }