Posted on: 5/22/2015 3:59:24 PM | Views : 587

Hello!
Please bear with me, I'm very new to this! I've recently made a very simple winform application that pulls data from an XML file and displays it in a form... My code looks like this:  
private void button1_Click(object sender, EventArgs e) { var xmlData = XElement.Load(@"C:\Work\Company.xml"); TreeNode treeNode = treeView1.Nodes.Add("Company"); LoadXmlElements(xmlData, treeNode); } private void LoadXmlElements(XElement xElem, TreeNode treeNode) { foreach (XElement element in xElem.Elements()) { if (element.HasElements) { if (element.FirstAttribute != null) { TreeNode tempNode = treeNode.Nodes.Add(element.FirstAttribute.Value); LoadXmlElements(element, tempNode); ...

Go to the complete details ...