列表章节的EPUB siegmann epublib

问题描述:

我可以把章节标题列表章节的EPUB siegmann epublib

private void logTableOfContents(List<TOCReference> tocReferences, int depth) { 
    if (tocReferences == null) { 
     return; 
    } 

    for (TOCReference tocReference : tocReferences) { 
     StringBuilder tocString = new StringBuilder(); 

     for (int i = 0; i < depth; i++) { 
      tocString.append("\t"); 
     } 
     tocString.append(tocReference.getTitle()); 

     Log.i("epublib", tocString.toString()); 
     logTableOfContents(tocReference.getChildren(), depth + 1); 

    } 

} 

列表如何移动到资源行,其中在本章开始了吗?

+0

只需要提一下,在EPUB 2中,没有“章节”的概念。事实上,在大多数EPUB文件中,XHTML文件对应于章节,并且列在NCX目录中,这更多的是一种惯例而不是正式的要求。 –

解决!所有epub书籍都有标签,其章节编号为