Posts

Showing posts with the label epub

How do I parse the toc.ncx file within an ePub document and display its hierarchy?

How do I parse the toc.ncx file within an ePub document and display its hierarchy? I have my application to read and display an ePub file almost ready. What I am looking now into is, if my table of contents for the book has a hierarchical structure for chapters, topics and subtopics, how do I parse the toc.ncx file (which has an XML structure), and load the data in a UITableView while preserving the hierarchical structure? 1 Answer 1 You can use NSXMLParser to parse the toc.ncx file. It's pretty straight forward, you can find the documentation here. Thanks for your solution. I am actually able to parse the file succesfully, but i am facing trouble while getting the hierarchical details of the file and presenting the same hierarchy in the UITableView format. – Vineet Kundu Mar 28 '12 at 12:57 ...