Exemplo n.º 1
0
 public void LoadFromXmlFile(string filePath)
 {
     XmlDocument document = new XmlDocument();
     document.Load(filePath);
     XmlNode nextSibling = document.FirstChild.NextSibling;
     foreach (XmlNode node2 in nextSibling.ChildNodes)
     {
         SimpleTextBranch branch = new SimpleTextBranch {
             BranchName = node2.Attributes.GetNamedItem("Name").Value
         };
         branch.LoadFromXmlNode(node2);
         this.Branches.Add(branch.BranchName, branch);
     }
 }
Exemplo n.º 2
0
        public void LoadFromXmlFile(string filePath)
        {
            XmlDocument document = new XmlDocument();

            document.Load(filePath);
            XmlNode nextSibling = document.FirstChild.NextSibling;

            foreach (XmlNode node2 in nextSibling.ChildNodes)
            {
                SimpleTextBranch branch = new SimpleTextBranch {
                    BranchName = node2.Attributes.GetNamedItem("Name").Value
                };
                branch.LoadFromXmlNode(node2);
                this.Branches.Add(branch.BranchName, branch);
            }
        }