Beispiel #1
0
        private static void ReadChildren(this XContainer topic, NodeBase node, IReadOnlyDictionary <string, XMindStyle> stylesById)
        {
            var children = new List <NodeBase>();

            var topics = topic.Element(Namespaces.Content("children"))?.Element(Namespaces.Content("topics"));

            if (topics != null && topics.IsAttributeEquals("type", "attached"))
            {
                foreach (var subtopic in topics.Elements(Namespaces.Content("topic")))
                {
                    var child = node.AddChildTransactional();

                    ReadNode(subtopic, child, stylesById);

                    children.Add(child);
                }
            }

            ReadBounds(topic, children);
        }