protected function isPathMatching(SimpleXmlElement $node, $name)
    {
        $pathPattern = $this->getPathRegex();
        $childPath = $node->getPath() . '/' . $name;

        if (!$pathPattern) {
            return false;
        }

        return (bool)preg_match($pathPattern, $childPath);
    }