def get_target_ns(xml_tree):
    """Extract the target namespace for the XML doc.

    Returns:
        str: Extracted from the `targetNamespace` attribute of the root element.

        If the root element does not have a `targetNamespace` attribute, return an empty
        string, "".

     Examples:

         <xs:schema
             targetNamespace="http://www.w3.org/XML/1998/namespace"
             xmlns:xs="http://www.w3.org/2001/XMLSchema">

         -> http://www.w3.org/XML/1998/namespace

    """
    ns_list = xml_tree.xpath("/*/@targetNamespace")
    if len(ns_list):
        return ns_list[0]
    return ""