I'm creating a MetroStyle app and I want to use a website API that is based on the HTTP Get methods. For instance to login I should download the XML returned by this URL:
websitehost.com/api/login.php?u=username&p=password
The problem is that the new MetroStyle apps won't let me to use many of the methods I've been using for years in .Net so how can I download the returned XML document and parse it?
You should be able to use
And then do whatever you need with the data, including loading it with XmlDocument or XElement or whatnot.
You might be searching for this:
You can use either the
Windows.Data.Xml.Dom.XmlDocument.LoadFromUriAsync(Uri)
method to automatically acquire and parse the XML, or you could manually use aWindows.Networking.BackgroundTransfer.DownloadOperation
instance to call the web service and acquire the data, andWindows.Data.Xml.Dom.XmlDocument.LoadXml(string)
to parse the data.