Exemplo n.º 1
0
        public static XmlElement SaveToElement(XmlDocument doc, string element_name, NodeBase.ChildrenCollection children, bool isClip)
        {
            var e = doc.CreateElement(element_name);

            for (int i = 0; i < children.Count; i++)
            {
                var e_node = SaveToElement(doc, children[i].GetType().Name, children[i], isClip);
                e.AppendChild(e_node);
            }

            return(e);
        }
Exemplo n.º 2
0
        public static void LoadFromElement(XmlElement e, NodeBase.ChildrenCollection children, bool isClip)
        {
            children.Node.ClearChildren();

            for (var i = 0; i < e.ChildNodes.Count; i++)
            {
                var e_child = e.ChildNodes[i] as XmlElement;
                if (e_child.LocalName != "Node")
                {
                    continue;
                }

                var node = children.Node.AddChild();
                LoadFromElement(e_child, node, isClip);
            }
        }