How to parse through XML file using a node Id. I want to get to <Rate>0.8988</Rate>
node of <rate id="USDEUR">
<results>
<rate id="USDEUR">
<Name>USD/EUR</Name>
<Rate>0.8988</Rate>
<Date>5/27/2016</Date>
<Time>6:56pm</Time>
<Ask>0.8989</Ask>
<Bid>0.8988</Bid>
</rate>
<rate id="USDJPY">
<Name>USD/JPY</Name>
<Rate>110.1250</Rate>
<Date>5/27/2016</Date>
<Time>6:53pm</Time>
<Ask>110.1500</Ask>
<Bid>110.1250</Bid>
</rate>
</results>
This is what I am able to do so far.
string sitemapurl = @"http://example.com/xmlforexrates";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(sitemapurl);
XmlNodeList nodeIds = xmlDoc.SelectNodes("/results/rate");
Right now it's getting all the <rate>
nodes in the NodeList. I just wanted to get node on Id based for example only <rate id="USDEUR">
Please help me do this. Thanks