public function render($echo = false)
    {
        $domDocument                = new \DOMDocument("1.0", "utf-8");
        $domDocument->xmlStandalone = true;
        $maniaLinks                 = $domDocument->createElement("manialinks");
        $domDocument->appendChild($maniaLinks);

        foreach ($this->children as $child) {
            $childXml = $child->render(false, $domDocument);
            $maniaLinks->appendChild($childXml);
        }

        if ($this->customUI) {
            $customUIElement = $this->customUI->render($domDocument);
            $maniaLinks->appendChild($customUIElement);
        }

        if ($echo) {
            header("Content-Type: application/xml; charset=utf-8;");
            echo $domDocument->saveXML();
        }

        return $domDocument;
    }