Skip to main content
2 of 4
added 2 characters in body
TddOrBust
  • 414
  • 3
  • 12

This will do it:

string xmlNode = root.SelectSingleNode("/observations/observation[@date='1976-01-01']/@value").Value; 

What this says is to select the @value of the observation node whose date is 1976-01-01. And to get just the integer of @value, you can either use whatever language you're doing this in (I'd bet it has a round function) or the xpath round function:

string xmlNode = root.SelectSingleNode("round(/observations/observation[@date='1976-01-01']/@value)").Value; 
TddOrBust
  • 414
  • 3
  • 12