RSC_005 tells you that an EPUB file could not be parsed or did not meet a structure rule. The text after the colon and the file path tell you what to inspect in XHTML, OPF, nav, NCX or another XML file.
Use the full parsing message to choose the next check.
A code identifies the error family. The message detail identifies the missing attribute, element, character or declaration that needs attention.
Matched
What it means
RSC_005 covers multiple XML and EPUB structure problems. A message naming an invalid element is different from an undefined entity or a duplicate ID. A filename such as nav.xhtml does not by itself mean the table of contents is missing.
Matched
Can it be fixed automatically?
The scanner can locate the file and distinguish parsing subtypes. Existing deterministic repairs cover certain XHTML root namespaces, known named entities, supported encoding declarations or conversions, and narrowly verified control-character or EPUB 2 DOCTYPE cases. Each correction must pass the complete post-repair checks before download.
Matched
What to check next
Save the full error, including the code, internal file path, line, column and message detail.
Matched
What not to assume
It cannot invent missing href targets or content, choose which duplicate ID a link should use, move arbitrary elements, or repair every malformed XML document. Unknown encoding, ambiguous namespace changes and author-dependent edits remain manual.
1. Example report output
Read a parsing error as a file-specific instruction.
This illustrative example contains enough information to investigate without assuming the book has no TOC.
Code
RSC_005
File and location
OEBPS/nav.xhtml, line 12, column 8
Message detail
The a element is missing its required href attribute.
Next check
Find that a element and confirm its intended link target in the source navigation.
Do not do this
Do not invent a target or replace the whole TOC solely because the filename is nav.xhtml.
The report can locate the issue; the intended link destination may still require the author or formatter.
2. Next step
Choose a repair or source edit from the details.
The report keeps the original message and explains why a correction is or is not available.
Verified repair
The existing file supports one exact correction.
Use a repaired copy only when the report offers one after both the structural recheck and EPUBCheck pass.
Manual review
The change depends on the intended document.
Use the file and message to restore the correct source markup, attribute, link destination or identifier.
Re-export
The exported document is incomplete or unreadable.
Return to the source project when the scan cannot establish a safe document structure or character decoding.
3. Concrete path example
A missing attribute needs the intended value.
Knowing which attribute is absent does not tell the tool where the link should go.
<!-- Reported XHTML -->
<a>Chapter one</a>
<!-- Confirm the intended chapter and anchor in the source first. -->
<!-- Do not insert an arbitrary href just to silence RSC_005. -->
For OPF, NCX or SMIL errors, follow that document's structure; do not replace its root namespace with the XHTML namespace.
Common situations
Match the words after Error while parsing file.
Use the full message to choose a row. These are different problems even when EPUBCheck reports the same code.
Matched
Duplicate ID or unresolved ID reference.
An identifier may appear more than once, or a reference may point to an identifier that is absent.
Compare every definition and reference before changing an ID. Use the duplicate-ID guide when the message explicitly says duplicate.
Matched
Missing required element, attribute or occurrence.
The named element lacks something required in that document, such as an href or a child element.
Inspect the element and its parent, then restore the intended source structure. A missing title or lang/xml:lang attribute needs the intended title or a known language value; do not infer either from the filename. Review conflicting or invalid language values in the source. Do not invent content or a link target.
Matched
Element or namespace is not allowed here.
Check both the document type and the element's position. An invalid nested element is different from a missing XHTML root namespace.
Only a verified XHTML namespace case can use the supported correction. OPF, NCX, SMIL and SVG have their own namespaces.
Matched
Named entity is not defined.
A named character reference may not be valid in the document. Known entities and unknown names need different handling.
Confirm the intended character. The scanner can normalize supported known entities only when the resulting XHTML remains valid.
Matched
Encoding declaration or invalid character error.
The declared encoding may disagree with the bytes, or prohibited control characters may prevent parsing.
Use automatic conversion only when decoding and the resulting document are verifiable. Unknown encodings or altered visible text require source review.
Matched
DOCTYPE does not match the document.
EPUB version, root namespace and the existing declaration all matter. Some EPUB 2 XHTML documents need a specific declaration.
The supported EPUB 2 correction is narrow. Do not copy a generic DOCTYPE over an unrelated or ambiguous XML document.
Matched
Unclosed tag, mismatched tag or malformed XML.
A missing delimiter or broken nesting can make the rest of the file unreadable. The reported position may follow the original mistake.
Inspect the surrounding source markup and restore its intended structure. Do not delete paragraphs or elements to suppress the error.
Error text for RSC_005: Error while parsing EPUB files
ERROR(RSC-005): OEBPS/nav.xhtml(12,8): Error while parsing file: element "a" missing required attribute "href"
Where RSC_005: Error while parsing EPUB files usually shows up
EPUBCheck and publishing services can report this after an EPUB export or edit. The error can be in a chapter, navigation, package metadata or another XML resource. Preserve the exact message rather than searching only for the code.
What it means
Why files with the same RSC_005 code need different changes.
XML parsing checks the file's markup and declarations; EPUB validation also checks which elements, attributes and values are allowed in that document. The reader may tolerate a problem that stricter validation exposes. Fixing one message may reveal another, so a local edit is not evidence that the whole book is valid.
Before you edit
Check the reported file without guessing its intended content.
Use the named file, not a similarly named source document. Line and column numbers refer to the file inside the EPUB.
1Save the full error, including the code, internal file path, line, column and message detail.
2Identify the document: chapter/nav XHTML, package OPF, NCX, SMIL, SVG or another XML file. Check its root element and EPUB version.
3Read the matching situation below. For a missing attribute or invalid element, inspect the named element and its parent before editing.
4Use the report's repair decision. A supported declaration repair is different from choosing an ID, link target or missing content.
5After a source edit, export a fresh EPUB and validate again. Retry the publishing platform separately after the structural checks pass.
Reading the validator message
EPUBCheck reports a code, location and specific detail.
The OPF file is the EPUB's map: metadata, file list, reading order, and navigation wiring. KDP and EPUBCheck use it to decide whether the book package is coherent.
Repair example
When EPUB Fixer can help with RSC_005: Error while parsing EPUB files.
Before / after example
Before: every parsing message looks like RSC_005. After: the report identifies a file and subtype so you can use a verified repair or make the correct source edit. Remaining blocking errors still prevent a repaired download.
Ready to retry?
Scan this EPUB before editing files for RSC_005: Error while parsing EPUB files.
The same error message can come from different files and different causes. Uploading the EPUB lets the report show the affected path or package field and whether the fix is safe to make automatically.
Questions authors ask about RSC_005: Error while parsing EPUB files.
Can RSC_005 be fixed automatically?
Some specific XHTML declaration, entity or encoding cases have deterministic repairs. The code alone does not establish that they apply. Missing content, ambiguous IDs and many malformed structures need manual editing.
Why does RSC_005 mention nav.xhtml when my TOC exists?
The navigation document can exist but contain invalid markup, such as a link without an href. Follow the full parsing message before replacing the TOC.
Is every RSC_005 an XHTML namespace problem?
No. It can describe several XML or schema problems in different document types. Never replace an OPF, NCX, SMIL or SVG namespace with the XHTML namespace just because the error says RSC_005.
How do RSC_016 and RSC_017 differ?
They report fatal parsing errors and parsing warnings. Keep the severity and full message; use the document and specific detail to decide the next step.
Does fixing one parsing error mean the EPUB will be accepted?
No. Validate the complete repaired or re-exported EPUB again. Publishing platforms also perform checks beyond EPUBCheck.