OBS: download the application please visit www.mrbool.com/player
Title: XML - Lesson 3-Loading an XML document into a treeview
Duration: 17:42 minutes
Summary: This video continues our discussion of XML. In this example we are loading an XML document into a treeview. The OpenFileDialog will help us select the XML file. If the user selects the file and clicks ok, the XmlDocument is loaded. We use two inner foreach loops that loop over the elements and their inner elements to populate the tree. An XmlElement has a ChildNodes collection. By going through the collection, we read the items one at a time, and we create a TreeNode for every item.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: XML and .NET 3.5
Keywords: XML, XmlDocument, OpenFileDialog, Application, TreeNode, Nodes, XmlNodeList, XmlNode, HasChildNodes, InnerText, TopNode, Attributes, DocumentElement, ChildNodes.