2016-03-23 7 views
0

は、私はどのようにこの章では、開始リソースの行に移動するには各章のタイトル一覧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 TOCにリストされているという事実は、正式な要件よりもコンベンションです。 –

答えて

0

解決済み!すべてのepubの書籍にはチャプターのタグが付いていますid

関連する問題