Simple XML File Download Issue

Hey everyone,

I’m trying to put the finishing touches on a Windows Store port of my game and am experiencing an issue. Apparently the WebClient class has been declared obsolete and is not available to Windows Store games, but every alternative I have tried has been a dead end.

I am simply trying to download an XML file and store its contents in a string,

Here is my original code:

WebClient w = new WebClient(new Uri(“http://www.example.com/myfile.xml”));
w.Headers[“Content-Type”] = “application/xml”;
string xmlStr = w.DownloadString(uri);

What would be the easiest way to accomplish this using the .NET subset available for Windows Store games?

Thanks for your help!

How about using Unity’s WWW class - Unity - Scripting API: WWW ?