I need to load an xml file, that is stored in my laptop, on a WP7 application. I have used the code that I found on a similar topic:
private void button2_Click(object sender, RoutedEventArgs e) { WebClient wc = new WebClient(); wc.DownloadStringCompleted += HttpsCompleted; wc.DownloadStringAsync(new Uri("https://domain/path/file.xml")); }
private void HttpsCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
XDocument xdoc = XDocument.Parse(e.Result, LoadOptions.None);
this.textBox1.Text = xdoc.FirstNode.ToString();
}
}
The path to the file I need to load is C:\test.xml
So what do i need to fill in the Uri?
I tried something like the following : "https://localhost/C:/test.xml" but doesnt work
Anyone can help me ?