public static function getElementId(\DOMElement $node)
    {
        if ($node->hasAttribute('dqn_tmp_id')) {
            return $node->getAttribute('dqn_tmp_id');
        }

        $node_id = md5(mt_rand());
        $node->setAttribute('dqn_tmp_id', $node_id);
        return $node_id;
    }