protected function registerNodes($nodeList)
    {
        // If the node list is invalid
        if (!is_array($nodeList) && !($nodeList instanceof \DOMNodeList)) {
            throw new RuntimeException(RuntimeException::INVALID_NODE_LIST_STR, RuntimeException::INVALID_NODE_LIST);
        }

        $nodes = [];

        // Run through and register all nodes
        /** @var \DOMNode $node */
        foreach ($nodeList as $node) {
            $nodes[$node->getNodePath()] = $this->registerNode($node);
        }

        return $nodes;
    }