private void Form1_Load(object sender, EventArgs e) { XmlDocument xDoc = new XmlDocument(); xDoc.Load(path); XmlNodeList PodList = xDoc.GetElementsByTagName("item"); //podlist XmlNodeList PodChannel = xDoc.GetElementsByTagName("channel"); //podchannel _PodCollection = new PodCollection(); foreach (XmlElement pod in PodList) { _Pod = new Pod(); _Pod.Title = pod["title"].InnerText; _Pod.Description = pod["description"].InnerText; _Pod.PubDate = pod["pubDate"].InnerText; _Pod.Enclosure = pod["enclosure"].GetAttribute("url"); _PodCollection.AddPod(_Pod); } foreach (XmlElement pod in PodChannel) { _Pod = new Pod(); _Pod.TitleMain = pod["title"].InnerText; _Pod.Link = pod["link"].InnerText; _Pod.DescriptionMain = pod["description"].InnerText; _Pod.Language = pod["language"].InnerText; _Pod.CopyRight = pod["copyright"].InnerText; _Pod.LastBuildDate = pod["lastBuildDate"].InnerText; _Pod.Generator = pod["generator"].InnerText; _Pod.WebMaster = pod["webMaster"].InnerText; _PodCollection.AddPodSettings(_Pod); } LoadContacts(); UpdateContact(_CurrentRecord); XMLSettings(0); //just get the first channel AddTextData(); //Set Sample data to add text }