The easiest way to check this is to isolate the QGIS part from the underlying GDAL part (which is what your XML uses). You can test using a command line, as explained in http://gdal.org/frmt_wms.html, which also explains the general syntax for the XML file.
Based on comments, it does appear that proxy settings are the problem.
GDAL uses the curl library for the HTTP/HTTPS layer, and that respects http_proxy
environment variable. However you can also specify a GDAL_HTTP_PROXY
environment variable, along with GDAL_HTTP_PROXYUSERPWD
and GDAL_PROXY_AUTH
if you need to authenticate to the proxy.
From https://trac.osgeo.org/gdal/wiki/ConfigOptions:
GDAL_HTTP_PROXY
Set HTTP proxy to use. The parameter should be the host name or dotted
IP address. To specify port number in this string, append :[port] to
the end of the host name. The proxy string may be prefixed with
[protocol]: since any such prefix will be ignored. The proxy's port
number may optionally be specified with the separate option. If not
specified, libcurl will default to using port 1080 for proxies.
GDAL respects the environment variables http_proxy, ftp_proxy,
all_proxy etc, if any of those are set. GDAL_HTTP_PROXY option does
however override any possibly set environment variables.
GDAL_HTTP_PROXYUSERPWD
The HTTP user and password to use for the connection to the HTTP
proxy. Must be in the form of [user name]:[password].
GDAL_PROXY_AUTH
Set value to [BASIC/NTLM/DIGEST/ANY] to tell libcurl which
authentication method(s) you want it to use for your proxy
authentication. See
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXYAUTH
for more information
On Windows 10, you can set these variables under Control Panel -> System and Security -> System. Use Advanced System settings and look at the bottom of the "Advanced" tab for "Environment Variables...". Or a web search will probably give you step-by-step instructions - one solution is at https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them
<GDAL_WMS>
part at the start).