Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-016: file is not well-formed XML

Updated:

EPUBCheck RSC-016 is a fatal error message: “Fatal Error while parsing file: ….” A file is not well-formed XML, so it cannot be parsed at all. EPUB content documents must be valid XML, and reading apps may show an error page or nothing at all for that chapter.

The official message

Fatal Error while parsing file: %1$s

Default severity
Fatal error. EPUBCheck could not continue checking this part of the EPUB. The file is invalid.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • An unescaped & in text or in a URL (it must be written &).
  • HTML named entities such as   that XML does not define.
  • Unclosed or mismatched tags, or an attribute without quotes.

How to fix it

  1. Read the text after the colon: EPUBCheck reports the file, the line and column, and the parser's own description of the problem.
  2. Escape & as &, replace named entities with numeric ones (  for a non-breaking space), and close every tag.
  3. Validate again: once the file parses, schema errors (RSC-005) may appear that were hidden before.

When it's not this

If the XML parses but an element or attribute is not allowed, the error is RSC-005.

Terms used here

Other RSC messages

  • RSC-015 A fragment identifier is required for svg use tag references.
  • RSC-017 Warning while parsing file: …
  • RSC-014 Fragment identifier defines an incompatible resource type.
  • RSC-013 Fragment identifier is used in a reference to a stylesheet resource.
  • RSC-019 EPUBs with Multiple Renditions should contain a META-INF/metadata.xml file.
  • RSC-012 Fragment identifier is not defined.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck RSC-016 mean?

EPUBCheck RSC-016 is a fatal error message: “Fatal Error while parsing file: ….” A file is not well-formed XML, so it cannot be parsed at all. EPUB content documents must be valid XML, and reading apps may show an error page or nothing at all for that chapter.

Is RSC-016 an error?

RSC-016 is reported as fatal error by default. EPUBCheck could not continue checking this part of the EPUB. The file is invalid.