def _build_xpath_prefix(parent):
    """Make the prefix for an xpath expression.

    The prefix of an xpath expression determines whether it operates relative
    to an element ("descendant::") or the document root ("//").

    Parameters
    ----------
    parent : browser or element
        The browser or element.

    Returns
    -------
    Str
        Either "descendant::" or "//".

    """
    return "descendant::" if isinstance(parent, parent.element_class) else "//"