protected function getNodeListForTagBasedQuery($dom, $marker)
    {
        $xpath = new \DOMXPath($dom);

        $query = '/project/file/markers/' . $marker . '|';
        $query .= '/project/file/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/class/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/class/*/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/interface/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/interface/*/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/function/docblock/tag[@name="' . $marker . '"]|';
        $query .= '/project/file/constant/docblock/tag[@name="' . $marker . '"]';

        return $xpath->query($query);
    }