XML File problem
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, Please help me regarding a doubt. i have a .xml file which is having around 3000 nodes, now I want to retrieve the name attribute of those nodes for which store attribute>30. Please suggest the esaiest way to do it. Thanks, Inder....
Just see this sample:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(@"<ROOT><NODE Name=""A""></NODE><NODE Name=""B""></NODE></ROOT>");
XmlNode rootNode = xmlDoc.SelectSingleNode("/ROOT");
foreach(XmlNode node in rootNode.ChildNodes)
{
Console.WriteLine(node.Attributes["Name"].Value);
}