tags:

views:

144

answers:

1

I am trying to extract information from the following xml: ezb

XmlDocument doc = new XmlDocument();
doc.Load("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
var x = doc.SelectSingleNode("//@time");
labelDate.Text= "Data From: " + x.Value;

works just fine! what does not work however and as far as I can tell the xpath-syntax is correct:

var z = doc.SelectSingleNode("//Cube[@currency='JPY']/@rate");
labelResult.Text = z.Value;

I am getting an exception: "object reference not set to an instance of an object". As far as I can tell I am not getting any data from my query which is odd as I am pretty sure it is correct. I appreciate any help!

A: 
Saulius
thx man, that fixed it right away. namespaces do not apply to attributes, might have to read up on that. cheers!
Hoax