Exemple #1
0
        private void _build_from_xml_doc(System.Xml.XmlDocument xml_document, VisioAutomation.Models.Layouts.Tree.Drawing tree_drawing)
        {
            var n = new VisioAutomation.Models.Layouts.Tree.Node();

            tree_drawing.Root = n;
            n.Text            = new VisioAutomation.Models.Text.Element(xml_document.Name);
            this._build_from_xml_element(xml_document.DocumentElement, n);
        }
Exemple #2
0
        private void _build_from_xml_element(System.Xml.XmlElement x, VisioAutomation.Models.Layouts.Tree.Node parent)
        {
            foreach (System.Xml.XmlNode xchild in x.ChildNodes)
            {
                if (xchild is System.Xml.XmlElement)
                {
                    var nchild = new VisioAutomation.Models.Layouts.Tree.Node();
                    nchild.Text = new VisioAutomation.Models.Text.Element(xchild.Name);

                    parent.Children.Add(nchild);
                    this._build_from_xml_element((System.Xml.XmlElement)xchild, nchild);
                }
            }
        }
Exemple #3
0
        private void build_from_xml_element(XmlElement x, Node parent)
        {
            foreach (XmlNode xchild in x.ChildNodes)
            {
                if (xchild is XmlElement)
                {
                    var nchild = new Node();
                    nchild.Text = new VisioAutomation.Models.Text.Element(xchild.Name);

                    parent.Children.Add(nchild);
                    this.build_from_xml_element((XmlElement)xchild, nchild);
                }
            }
        }