This specific url <-- (click to view) is working fine.
http://bankisrael.gov.il/currency.xml
But when trying to read from it to extract currency, this is what I get no matter which way I try to tackle it ...
<html><body><script>document.cookie='iiiiiii=e0076bcciiiiiii_e0076bcc; path=/';window.location.href=window.location.href;</script></body></html>
Tried following :
using (WebClient c = new WebClient())
{
var result = c.DownloadString(@"http://bankisrael.gov.il/currency.xml");
}
Tried with above WebClient ... but not as first try.
This next code was my first try. What am I doing wrong ?
While "surfing" to the URL above, the XML is there. I would like to try with your help first before desperately I could think of another way.
I would be able to save the file to my hard drive (programmatically), then read it from the hdd. For that approach I didn't test yet, though I am sure it will work.
But I was trying to check with some experienced developers to have a try on this. What could be wrong?
string DollarURL = "http://bankisrael.gov.il/currency.xml";
xx.Load(DollarURL);
XmlNode root = xx;