public static function addNodeFromFile(\DOMNode $rootNode, $filename, $nodetoadd)
    {
        if ($rootNode === null) {
            return;
        }
        if (!file_exists($filename)) {
            return;
        }

        $source = XmlUtil::createXmlDocumentFromFile($filename);

        $nodes = $source->getElementsByTagName($nodetoadd)->item(0)->childNodes;

        foreach ($nodes as $node) {
            $newNode = $rootNode->ownerDocument->importNode($node, true);
            $rootNode->appendChild($newNode);
        }
    }