I want to read Bank of Canada XML response to get the closing rates of each currency. But they have very complex XML Response, you can check at
Visit www.bankofcanada.ca/stats/assets/rates_rss/closing/en_all.xml
I'm trying my old way for parsing XML but that work's fine only with simple XML i.e
var url ="http://www.bankofcanada.ca/stats/assets/rates_rss/closing/en_all.xml";
var uploadResult = CurrencyAPI.TriggerApiAction(url);
XDocument xDoc = XDocument.Parse(CurrencyAPI.backstr);
foreach (var download in xDoc.Descendants("cb:exchangeRate"))
{
a1 = download.Element("cb:value").Value;
a2 = download.Element("cb:baseCurrency").Value;
a3 = download.Element("cb:targetCurrency").Value;
}
Please help me with this Thanks