The wp-admin are of my site is available via https only; for that reason any use of
get_template_directory_uri(); in the admin area generates a url as such https://mysite.co.uk/...
I am able to successfully enqueue scripts and styles using
get_template_directory_uri(); however when I attempt to use
simplexml_file_load(); to access a local xml document in the admin area of the site, the file fails to load.
I can get around this by hardcoding a non https version of my theme directory, but for obvious reasons, this isn't practical.
simplexml_load_file(get_template_directory_uri().'/myxml.xml'); - does not work
simplexml_load_file('https://mysite.co.uk/my-theme/myxml.xml'); - does not work
simplexml_load_file('http://mysite.co.uk/my-theme/myxml.xml'); - does work