I am trying to get live currency rate from this url: http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=GBP&ToCurrency=LTL
This is what I tried:
public void getRate(string howmuch, string from, string to)
{
int hmuch = int.Parse(howmuch);
string url = "http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=GBP&ToCurrency=LTL";
var xml = XDocument.Load(url);
var result = xml.Descendants("double");
btn.Content = result;
}
I get an error from XDocument.Load that I need to pass URI from filesystem, not URL from web. I didn't found correct way on the web to do this in windows phone, only with full C#. How to properly get that value between double tags?