Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 540327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:13:44+00:00 2026-05-13T10:13:44+00:00

I am trying to develop an iPhone application to read ePub files. Is there

  • 0

I am trying to develop an iPhone application to read ePub files. Is there any framework available to develop this? I have no idea about how to read this file format. I tried to parse a sample file with .epub extension using NSXML Parser, but that fails.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:13:44+00:00Added an answer on May 13, 2026 at 10:13 am

    The EPUB format brings together a bunch of different specifications / formats:

    • one to say what the content of the book should look like (a subset of XHTML 1.1 + CSS)
    • one to define a “manifest” that lists all of the files that make up that content (OPF, which is an XML file)
    • one to define how everything is packaged up (OEBPS: a zip file of everything in the manifest plus a few extra files)

    The specs look a bit daunting but actually once you’ve got the basics (unzipping, parsing XML) down it’s not particularly difficult or complex.

    You’ll need to work out how to download the EPUB, to unzip it somewhere, to parse the manifest and then to display the relevant content.

    Some pointers if you’re just starting out:

    • parse xml
    • unzip

    To display content just use a UIWebView for now.

    Here’s a high level step by step for your code:

    1) create a view with a UIWebView

    2) download the EPUB file

    3) unzip it to a subdirectory in your app’s documents folder using the zip library, linked above

    4) parse the XML file at META-INF/container.xml (if this file doesn’t exist the EPUB is invalid) using TBXML, linked above

    5) In this XML, find the first “rootfile” with media-type application/oebps-package+xml. This is the OPF file for the book.

    6) parse the OPF file (also XML)

    7) now you need to know what the first chapter of the book is.

    a) each <item> in the <manifest> element has an id and an href. Store these in an NSDictionary where the key is the id and the object is the href.

    b) Look at the first <itemref> in the <spine>. It has an idref attribute which corresponds to one of the ids in (a). Look up that id in the NSDictionary and you’ll get an href.

    c) this is the the file of the first chapter to show the user. Work out what the full path is (hint: it’s wherever you unzipped the zip file to in (3) plus the base directory of the OPF file in (6))

    8) create an NSURL using fileURLWithPath:, where the path is the full path from (7c). Load this request using the UIWebView you created in (1).

    You’ll need to implement forward / backward buttons or swipes or something so that users can move from one chapter to another. Use the <spine> to work out which file to show next – the <itemrefs> in the XML are in the order they should appear to the reader.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 377k
  • Answers 377k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Place it as a generic UIView, then use the inspector… May 14, 2026 at 8:45 pm
  • Editorial Team
    Editorial Team added an answer To accomplish what you want, you can use a LinearLayout… May 14, 2026 at 8:45 pm
  • Editorial Team
    Editorial Team added an answer How about using the Join method of Fluent NHibernate to… May 14, 2026 at 8:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.