/** * Getter for node by path * * @param string $nodePath * @throws Magento_Exception an exception is possible if original document contains multiple fixed nodes * @return DOMElement | null */ protected function _getMatchedNode($nodePath) { if (!preg_match('/^\\/config(\\/menu)?$/i', $nodePath)) { return null; } return parent::_getMatchedNode($nodePath); }