Exemple #1
0
        public static Section FromXElement(XElement element)
        {
            var section = new Section();

            section.Title = SectionTitle.FromXElement(element.Fb2Element(TitleTagName));

            var nodes = element.Elements().ToList();

            foreach (var node in nodes)
            {
                var el = SectionFormatElement.FromXElement(node);
                if (el != null)
                {
                    section.SectionElements.Add(el);
                }
            }

            var subSections = element.Fb2Elements("section");
            var ps          = element.Fb2Elements("p");

            foreach (var p in ps)
            {
            }

            return(section);
        }
        public static SectionTitle FromXElement(XElement element)
        {
            var sectionTitle = new SectionTitle();

            var nodes = element.Elements().ToList();

            foreach (var node in nodes)
            {
                var el = SectionFormatElement.FromXElement(node);
                if (el != null)
                {
                    sectionTitle.TitleElements.Add(el);
                }
            }

            return(sectionTitle);
        }