psiegman / epublib

a java library for reading and writing epub files
http://www.siegmann.nl/epublib
1.06k stars 317 forks source link

Fatal errors, how to solve? #61

Closed DanielRuf closed 8 years ago

DanielRuf commented 11 years ago

I get these fatal errors on my console:

[Fatal Error] :1:2: Markup im Dokument vor dem Root-Element muss ordnungsgemäß formatiert sein. [Fatal Error] :18:49: Präfix "opf" für Attribut "opf:scheme", das mit Elementtyp "dc:identifier" verknüpft ist, ist nicht gebunden.

How to catch these exceptions and solve them? Where do they come from?

Seems this comes from XMLPull. But what API/version do we need from XMLPull?

Are there more dependencies? What is with org.w3c.dom?

psiegman commented 11 years ago

Hi Daniel,

This error means that the opf document is missing the namespace declaration for the opf prefix. Unzip the epub file, and check the index xml files. Open the file /META-INF/container.xml and find the file referenced by rootFile. Then open the file mentioned there.

Paul

DanielRuf commented 11 years ago

So these files can not be parsed and we can not retrieve the information about author and title? These are invalid epub files?

psiegman commented 11 years ago

Yes, they seem to be invalid. Can you send me one so I can have a look ?

Paul

DanielRuf commented 11 years ago

I can do so, if I have it again. It is on another computer