public IEnumerable <NavigationPoint> ExtractNavigationPoints(
            XmlStructureFile xHtmlToc, IEnumerable <File> files)
        {
            var navigationOrderProcessor = NavigationOrderProcessor.Create();
            var navElement = GetRootOrderedList(xHtmlToc.Doc);

            return(ProcessOrderedListRecursive(
                       navElement, navigationOrderProcessor, EpubPathHelper.GetDirectoryName(xHtmlToc.Path), files).ToArray());
        }
        public IEnumerable <NavigationPoint> ExtractNavigationPoints(XmlStructureFile ncx, IEnumerable <File> files)
        {
            var root     = ncx.Doc.Root;
            var basePath = EpubPathHelper.GetDirectoryName(ncx.Path);

            var navMap = root.Elements()
                         .Single(element => element.Name.Equals(XmlNamespaces.Ncx + NcxXmlNames.NavMapElementName));
            var orderProcessor = NavigationOrderProcessor.Create(navMap);

            return(FilterAndSelectChildNavPoints(navMap, orderProcessor, basePath, files));
        }