Returns the appropriate catalog URL by replacing html with xml in some
        cases
        :param str url: URL to the catalog
779729
def _get_catalog_url(self, url):
        '''
        
        '''
        u = urlparse.urlsplit(url)
        name, ext = os.path.splitext(u.path)
        if ext == ".html":
            u = urlparse.urlsplit(url.replace(".html", ".xml"))
        url = u.geturl()
        return url
672489
def parseURI(str):
    
    ret = libxml2mod.xmlParseURI(str)
    if ret is None:raise uriError('xmlParseURI() failed')
    return URI(_obj=ret)
314710
def get_url(url, catch_exception=False):
    
    return _get_url(url, catch_exception, urlopen=urllib2.urlopen)
28584
def get_url(self, url, fields=None, **urlopen_kw):
        
        return self.request_encode_url('GET', url, fields=fields,
                                       **urlopen_kw)
329295
def relaxNGNewParserCtxt(URL):
    
    ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
    if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
    return relaxNgParserCtxt(_obj=ret)
166111
def get(self, url):
        
        self._load(url)
        self._flush()

        return self.metadata[url]
832043
def _get_url_base(self, url):
        
        s = urlsplit(url)
        return urlunsplit([s.scheme, s.netloc, '', '', ''])
590031
def htmlReadDoc(cur, URL, encoding, options):
    
    ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
    if ret is None:raise treeError('htmlReadDoc() failed')
    return xmlDoc(_obj=ret)
460221
def get_short_url(self, entry):
        
        try:
            short_url = entry.short_url
        except NoReverseMatch:
            short_url = entry.get_absolute_url()
        return format_html('<a href="{url}" target="blank">{url}</a>',
                           url=short_url)
281439
def get_url_params(url: str, fragment: bool = False) -> dict:
    
    parsed_url = urlparse(url)
    if fragment:
        url_query = parse_qsl(parsed_url.fragment)
    else:
        url_query = parse_qsl(parsed_url.query)
    return dict(url_query)
268405
def get(url):
    
    url = text_type(url)
    if url.find("://") == -1:
        Log.error("{{url}} must have a prototcol (eg http://) declared", url=url)

    base = URL("")
    if url.startswith("file://") and url[7] != "/":
        if os.sep=="\\":
            base = URL("file:///" + os.getcwd().replace(os.sep, "/").rstrip("/") + "/.")
        else:
            base = URL("file://" + os.getcwd().rstrip("/") + "/.")
    elif url[url.find("://") + 3] != "/":
        Log.error("{{url}} must be absolute", url=url)

    phase1 = _replace_ref(wrap({"$ref": url}), base)  # BLANK URL ONLY WORKS IF url IS ABSOLUTE
    try:
        phase2 = _replace_locals(phase1, [phase1])
        return wrap(phase2)
    except Exception as e:
        Log.error("problem replacing locals in\n{{phase1}}", phase1=phase1, cause=e)
816177
def _url(self, url):
        

        protocol = 'https' if self.https else 'http'
        return '{0}://{1}/spaces/{2}{3}'.format(
            protocol,
            self.api_url,
            self.space_id,
            url
        )
47441
def get_url(self, filename, query_para=None, **url_args):
        
        from uliweb.core.html import Tag
        
        title = url_args.pop('title', filename)
        text = url_args.pop('text', title)
        query_para = query_para or {}
        return str(Tag('a', title, href=self.get_href(filename, **query_para), **url_args))
316815
public XmlHttpResponse doHttpGetXml(String url) {
        XmlHttpResponse response = new XmlHttpResponse();
        doGet(url, response);
        setContext(response);
        return response;
    }
110687
def request_xml(url, auth=None):
    '''
    
    '''
    try:
        r = requests.get(url, auth=auth, verify=False)
        return r.text.encode('utf-8')
    except BaseException:
        logger.error("Skipping %s (error parsing the XML)" % url)
    return
678240
def url(self, var, default=NOTSET):
        
        return self.get_value(var, cast=urlparse, default=default, parse_default=True)
1138322
def url_to_text(self, url):
        '''
        

        '''
        path, headers = urllib.request.urlretrieve(url)
        return self.path_to_text(path)