public function getElement(\DOMElement $nodeList, $level = 0, $showPaths = false)
    {
        $tabs = str_repeat("\t", $level);
        $output = '';
        if (!$showPaths) {
            $output = "";
            foreach ($nodeList as $attribute) {
                $output .= $tabs . $attribute->nodeName . " = " . $attribute->nodeValue . "\n";
            }

            $output .= $tabs . $nodeList->nodeName . " = " . $nodeList->nodeValue . "\n";
        } else {
            $output .= $nodeList->getNodePath() . "\n";
        }

        foreach ($nodeList->childNodes as $childObject) {
            if ($childObject instanceof \DOMElement) {
                $output .= $this->getElement($childObject, $level + 1, $showPaths);
            } elseif ($showPaths) {
                $output .= $childObject->getNodePath() . "\n";
            }
        }

        return $output;
    }