Hi,
Assuming that you are trying to read a pre-existing xml file and pick up a certain element, you can make use of XMLDocument object as shown below:
using System.Xml;
string filePath = "D:\xmlFile.xml";
XMLDocument document = new XMLDocument();
string name = string.empty;
document.Load(filePath);
XMLNodeList nodes = document.SelectNodes("/NewDataSet/Table");
foreach(int nodeCount = 0; nodeCount< nodes.Count; nodeCount++)
{
name = nodes[nodeCount]["name"].InnerText;
}
Please let me know if this works for you or not.
Thanks.